KVM: VMX: Use shared msr infrastructure
authorAvi Kivity <avi@redhat.com>
Mon, 7 Sep 2009 08:14:12 +0000 (11:14 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 3 Dec 2009 07:32:22 +0000 (09:32 +0200)
commit26bb0981b3ff00b9177d61fe55806db978862b3c
treec64237caadf82729ca0d8aa9a9a66bdce27e66be
parent18863bdd60f895f3b3ba16b15e8331aee781e8ec
KVM: VMX: Use shared msr infrastructure

Instead of reloading syscall MSRs on every preemption, use the new shared
msr infrastructure to reload them at the last possible minute (just before
exit to userspace).

Improves vcpu/idle/vcpu switches by about 2000 cycles (when EFER needs to be
reloaded as well).

[jan: fix slot index missing indirection]

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c