]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Only reload guest cr2 if different from host cr2
authorAvi Kivity <avi@redhat.com>
Tue, 16 Jun 2009 09:33:56 +0000 (12:33 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 05:32:57 +0000 (08:32 +0300)
commit645751803daacc1c45aa2e7c98975ee971599455
tree7fde2dfa8f43e1619e0d31549e54fef4d19a374d
parent65f77ab31e9eabd5a4ca02f56f0d7d7325df004d
KVM: VMX: Only reload guest cr2 if different from host cr2

cr2 changes only rarely, and writing it is expensive.  Avoid the costly cr2
writes by checking if it does not already hold the desired value.

Shaves 70 cycles off the vmexit latency.

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