]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - arch/x86/kvm/vmx.c
KVM: nVMX: Fully emulate preemption timer
authorJan Kiszka <jan.kiszka@siemens.com>
Fri, 7 Mar 2014 19:03:13 +0000 (20:03 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 11 Mar 2014 07:41:45 +0000 (08:41 +0100)
commitf4124500c2c13eb1208c6143b3f6d469709dea10
treebb1a937a6a240cf3782c63223ca9584de1a7b63f
parentb6b8a1451fc40412c57d10c94b62e22acab28f94
KVM: nVMX: Fully emulate preemption timer

We cannot rely on the hardware-provided preemption timer support because
we are holding L2 in HLT outside non-root mode. Furthermore, emulating
the preemption will resolve tick rate errata on older Intel CPUs.

The emulation is based on hrtimer which is started on L2 entry, stopped
on L2 exit and evaluated via the new check_nested_events hook. As we no
longer rely on hardware features, we can enable both the preemption
timer support and value saving unconditionally.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c