KVM: Cache pdptrs

Instead of reloading the pdptrs on every entry and exit (vmcs writes on vmx,
guest memory access on svm) extract them on demand.

Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Avi Kivity
2009-05-31 22:58:47 +03:00
parent 8f5d549f02
commit 6de4f3ada4
7 changed files with 63 additions and 13 deletions

View File

@@ -131,7 +131,7 @@ walk:
pte = vcpu->arch.cr3;
#if PTTYPE == 64
if (!is_long_mode(vcpu)) {
pte = vcpu->arch.pdptrs[(addr >> 30) & 3];
pte = kvm_pdptr_read(vcpu, (addr >> 30) & 3);
if (!is_present_pte(pte))
goto not_present;
--walker->level;