diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2010-09-10 11:30:42 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 04:52:31 -0400 |
commit | 5777ed340d89cdc6c76a5c552337a3861b40a806 (patch) | |
tree | 7f3c3a8da975dadef7e00fc92c39bd3ab5862a60 /arch/x86/kvm/paging_tmpl.h | |
parent | 1c97f0a04c74196880f22a563134c8f6d0b9d752 (diff) |
KVM: MMU: Introduce get_cr3 function pointer
This function pointer in the MMU context is required to
implement Nested Nested Paging.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
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.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index e4ad3dc84df3..13d0c06b1bc8 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -130,7 +130,7 @@ walk: | |||
130 | present = true; | 130 | present = true; |
131 | eperm = rsvd_fault = false; | 131 | eperm = rsvd_fault = false; |
132 | walker->level = vcpu->arch.mmu.root_level; | 132 | walker->level = vcpu->arch.mmu.root_level; |
133 | pte = vcpu->arch.cr3; | 133 | pte = vcpu->arch.mmu.get_cr3(vcpu); |
134 | #if PTTYPE == 64 | 134 | #if PTTYPE == 64 |
135 | if (vcpu->arch.mmu.root_level == PT32E_ROOT_LEVEL) { | 135 | if (vcpu->arch.mmu.root_level == PT32E_ROOT_LEVEL) { |
136 | pte = kvm_pdptr_read(vcpu, (addr >> 30) & 3); | 136 | pte = kvm_pdptr_read(vcpu, (addr >> 30) & 3); |
@@ -143,7 +143,7 @@ walk: | |||
143 | } | 143 | } |
144 | #endif | 144 | #endif |
145 | ASSERT((!is_long_mode(vcpu) && is_pae(vcpu)) || | 145 | ASSERT((!is_long_mode(vcpu) && is_pae(vcpu)) || |
146 | (vcpu->arch.cr3 & CR3_NONPAE_RESERVED_BITS) == 0); | 146 | (vcpu->arch.mmu.get_cr3(vcpu) & CR3_NONPAE_RESERVED_BITS) == 0); |
147 | 147 | ||
148 | pt_access = ACC_ALL; | 148 | pt_access = ACC_ALL; |
149 | 149 | ||