KVM: Fetch guest cr3 from hardware on demand
commitaff48baa34c033318ad322ecbf2e4bcd891b29ca
authorAvi Kivity <avi@redhat.com>
Sun, 5 Dec 2010 16:56:11 +0000 (5 18:56 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 12 Jan 2011 09:31:16 +0000 (12 11:31 +0200)
tree84955c55c812dd540cd0c54e5bdf6d3f5bfd08be
parent9f8fe5043fd26627c2fa2e9a41896885e675000b
KVM: Fetch guest cr3 from hardware on demand

Instead of syncing the guest cr3 every exit, which is expensince on vmx
with ept enabled, sync it only on demand.

[sheng: fix incorrect cr3 seen by Windows XP]

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/kvm_cache_regs.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c