Adnan Zubaidi
Adnan Zubaidi

Reputation: 21

run qemu with both kvm & icount options

I'm running qemu which emulates x86_64 processor on top of x86 host machine, and I'm interesting in achieving the following:

1) better execution time, so KVM is a better way to achieve that, as the guest and host machines share the same architecture.

2) counting the number of instruction generated by the guest machine(qemu), and virtual clock (-icount option) achieved that

I was trying to run the qemu including both kvm & icount options (-enable-kvm -icount 0) and I got this message "-icount is not allowed with kvm or xen"

is it possible to run the qemu including both options? thanks .

Upvotes: 2

Views: 2311

Answers (1)

PaulR
PaulR

Reputation: 3707

As far as I know from reading the source code and debugging QEMU, -icount works by adding code to count the instructions and decrease a counter after every basic block translated by TCG, utilizing a small check at the beginning of each basic block to interrupt execution after each N guest instructions.

This approach cannot work with kvm or xen, as there is no code translation performed in this case that could add the additional instrumentation. So no, this is not possible, without a signficant change to QEMU.

Upvotes: 4

Related Questions