aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/paging_tmpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/paging_tmpl.h')
-rw-r--r--drivers/kvm/paging_tmpl.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index fb19596c9589..56b88f7e83ef 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -129,11 +129,11 @@ static int FNAME(walk_addr)(struct guest_walker *walker,
129 129
130 pgprintk("%s: addr %lx\n", __FUNCTION__, addr); 130 pgprintk("%s: addr %lx\n", __FUNCTION__, addr);
131walk: 131walk:
132 walker->level = vcpu->mmu.root_level; 132 walker->level = vcpu->arch.mmu.root_level;
133 pte = vcpu->cr3; 133 pte = vcpu->arch.cr3;
134#if PTTYPE == 64 134#if PTTYPE == 64
135 if (!is_long_mode(vcpu)) { 135 if (!is_long_mode(vcpu)) {
136 pte = vcpu->pdptrs[(addr >> 30) & 3]; 136 pte = vcpu->arch.pdptrs[(addr >> 30) & 3];
137 if (!is_present_pte(pte)) 137 if (!is_present_pte(pte))
138 goto not_present; 138 goto not_present;
139 --walker->level; 139 --walker->level;
@@ -275,10 +275,10 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
275 if (!is_present_pte(walker->ptes[walker->level - 1])) 275 if (!is_present_pte(walker->ptes[walker->level - 1]))
276 return NULL; 276 return NULL;
277 277
278 shadow_addr = vcpu->mmu.root_hpa; 278 shadow_addr = vcpu->arch.mmu.root_hpa;
279 level = vcpu->mmu.shadow_root_level; 279 level = vcpu->arch.mmu.shadow_root_level;
280 if (level == PT32E_ROOT_LEVEL) { 280 if (level == PT32E_ROOT_LEVEL) {
281 shadow_addr = vcpu->mmu.pae_root[(addr >> 30) & 3]; 281 shadow_addr = vcpu->arch.mmu.pae_root[(addr >> 30) & 3];
282 shadow_addr &= PT64_BASE_ADDR_MASK; 282 shadow_addr &= PT64_BASE_ADDR_MASK;
283 --level; 283 --level;
284 } 284 }
@@ -380,7 +380,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr,
380 if (!r) { 380 if (!r) {
381 pgprintk("%s: guest page fault\n", __FUNCTION__); 381 pgprintk("%s: guest page fault\n", __FUNCTION__);
382 inject_page_fault(vcpu, addr, walker.error_code); 382 inject_page_fault(vcpu, addr, walker.error_code);
383 vcpu->last_pt_write_count = 0; /* reset fork detector */ 383 vcpu->arch.last_pt_write_count = 0; /* reset fork detector */
384 return 0; 384 return 0;
385 } 385 }
386 386
@@ -390,7 +390,7 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr,
390 shadow_pte, *shadow_pte, write_pt); 390 shadow_pte, *shadow_pte, write_pt);
391 391
392 if (!write_pt) 392 if (!write_pt)
393 vcpu->last_pt_write_count = 0; /* reset fork detector */ 393 vcpu->arch.last_pt_write_count = 0; /* reset fork detector */
394 394
395 /* 395 /*
396 * mmio: emulate if accessible, otherwise its a guest fault. 396 * mmio: emulate if accessible, otherwise its a guest fault.