On 24/01/2017 01:35, Don Bowman wrote: > The below C program, run on my host, uses ~0% of the host CPU when run > with 100000 (e.g. wake up every 100us). > > When run under kvm, this uses ~100% of the processor. The reason is there > is a vmexit for every timer wakeup. > > Now, my host processor is E5-2699 v3, and this includes apicv > functionality. My host kernel is 4.9 (as is the guest). qemu is 2.5. > (ubuntu 16.04). > > My understanding from the apicv feature was this timer could be entirely > done inside the guest on this generation (haswell) of processor. No, unfortunately not. The APICv feature accelerates little more than interrupt injection. Everything else, including timers, still has to be done manually by the hypervisor. Paolo