]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: Do not unconditionally read PDPTE from guest memory
authorAvi Kivity <avi@redhat.com>
Thu, 28 Jul 2011 08:36:17 +0000 (11:36 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Sep 2011 16:18:01 +0000 (19:18 +0300)
commitb3dfcbf5ce2b5d18f094de0d46f2f908b9ca4939
tree130dcb08868586e46ad6ad488dd4ba0e219f90c2
parentf27a4552702de77a30928b1b07795f62934d37a0
KVM: MMU: Do not unconditionally read PDPTE from guest memory

Architecturally, PDPTEs are cached in the PDPTRs when CR3 is reloaded.
On SVM, it is not possible to implement this, but on VMX this is possible
and was indeed implemented until nested SVM changed this to unconditionally
read PDPTEs dynamically.  This has noticable impact when running PAE guests.

Fix by changing the MMU to read PDPTRs from the cache, falling back to
reading from memory for the nested MMU.

Signed-off-by: Avi Kivity <avi@redhat.com>
Tested-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/kvm_cache_regs.h
arch/x86/kvm/mmu.c
arch/x86/kvm/paging_tmpl.h
arch/x86/kvm/svm.c