summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/paging_tmpl.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-05-31 22:58:47 +0300
committerAvi Kivity <avi@redhat.com>2009-09-10 08:32:46 +0300
commit6de4f3ada40b336522250a7832a0cc4de8856589 (patch)
tree90920846774aa0fb0fb47ac245fcf5f8b73afcee /arch/x86/kvm/paging_tmpl.h
parent8f5d549f028056d6ad6044f2d9e27ecf361d955e (diff)
downloadlinux-6de4f3ada40b336522250a7832a0cc4de8856589.tar.gz
linux-6de4f3ada40b336522250a7832a0cc4de8856589.tar.bz2
linux-6de4f3ada40b336522250a7832a0cc4de8856589.zip
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>
Diffstat (limited to 'arch/x86/kvm/paging_tmpl.h')
-rw-r--r--arch/x86/kvm/paging_tmpl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 67785f635399..4cb1dbfd7c2a 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -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;