]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Avoid saving and restoring msr_efer on lightweight vmexit
authorEddie Dong <eddie.dong@intel.com>
Mon, 21 May 2007 04:28:09 +0000 (07:28 +0300)
committerAvi Kivity <avi@qumranet.com>
Mon, 16 Jul 2007 09:05:42 +0000 (12:05 +0300)
commit23b51503cba30f5637aba3e25adb30e697bf4589
treee4fd63e0e79613fbb7e475dcdd0ea01c370e02a8
parentc42562f45bc4939e92b7376babddefd47dd46de2
KVM: VMX: Avoid saving and restoring msr_efer on lightweight vmexit

MSR_EFER.LME/LMA bits are automatically save/restored by VMX
hardware, KVM only needs to save NX/SCE bits at time of heavy
weight VM Exit. But clearing NX bits in host envirnment may
cause system hang if the host page table is using EXB bits,
thus we leave NX bits as it is. If Host NX=1 and guest NX=0, we
can do guest page table EXB bits check before inserting a shadow
pte (though no guest is expecting to see this kind of gp fault).
If host NX=0, we present guest no Execute-Disable feature to guest,
thus no host NX=0, guest NX=1 combination.

This patch reduces raw vmexit time by ~27%.

Me: fix compile warnings on i386.

Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm.h
drivers/kvm/kvm_main.c
drivers/kvm/vmx.c