aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/paging_tmpl.h
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-07-27 10:30:44 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:33:18 -0400
commit852e3c19ac64b7c3912e8efe42d3ce090ebc0161 (patch)
treecc4fd27e59002191dc09ccf6a6e4006c66c3df38 /arch/x86/kvm/paging_tmpl.h
parentd25797b24c0ff2efc2b2fabaebb0ec0cafc0d3e3 (diff)
KVM: MMU: make direct mapping paths aware of mapping levels
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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 44f0346578cb..b167f0d57b54 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -253,7 +253,7 @@ static void FNAME(update_pte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *page,
253 pt_element_t gpte; 253 pt_element_t gpte;
254 unsigned pte_access; 254 unsigned pte_access;
255 pfn_t pfn; 255 pfn_t pfn;
256 int largepage = vcpu->arch.update_pte.largepage; 256 int level = vcpu->arch.update_pte.level;
257 257
258 gpte = *(const pt_element_t *)pte; 258 gpte = *(const pt_element_t *)pte;
259 if (~gpte & (PT_PRESENT_MASK | PT_ACCESSED_MASK)) { 259 if (~gpte & (PT_PRESENT_MASK | PT_ACCESSED_MASK)) {
@@ -272,7 +272,7 @@ static void FNAME(update_pte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *page,
272 return; 272 return;
273 kvm_get_pfn(pfn); 273 kvm_get_pfn(pfn);
274 mmu_set_spte(vcpu, spte, page->role.access, pte_access, 0, 0, 274 mmu_set_spte(vcpu, spte, page->role.access, pte_access, 0, 0,
275 gpte & PT_DIRTY_MASK, NULL, largepage, 275 gpte & PT_DIRTY_MASK, NULL, level,
276 gpte_to_gfn(gpte), pfn, true); 276 gpte_to_gfn(gpte), pfn, true);
277} 277}
278 278
@@ -306,7 +306,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
306 gw->pte_access & access, 306 gw->pte_access & access,
307 user_fault, write_fault, 307 user_fault, write_fault,
308 gw->ptes[gw->level-1] & PT_DIRTY_MASK, 308 gw->ptes[gw->level-1] & PT_DIRTY_MASK,
309 ptwrite, largepage, 309 ptwrite, level,
310 gw->gfn, pfn, false); 310 gw->gfn, pfn, false);
311 break; 311 break;
312 } 312 }