aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/paging_tmpl.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-01-11 06:02:10 -0500
committerAvi Kivity <avi@redhat.com>2009-03-24 05:03:04 -0400
commitf6e2c02b6d28ddabe99377c5640a833407a62632 (patch)
tree57c435d07989069fd315afe48153a07ebc895f99 /arch/x86/kvm/paging_tmpl.h
parent9903a927a4aea4b1ea42356a8453fca664df0b18 (diff)
KVM: MMU: Rename "metaphysical" attribute to "direct"
This actually describes what is going on, rather than alerting the reader that something strange is going on. 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.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 46b68f941f60..7314c0944c5f 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -277,7 +277,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
277 unsigned access = gw->pt_access; 277 unsigned access = gw->pt_access;
278 struct kvm_mmu_page *shadow_page; 278 struct kvm_mmu_page *shadow_page;
279 u64 spte, *sptep; 279 u64 spte, *sptep;
280 int metaphysical; 280 int direct;
281 gfn_t table_gfn; 281 gfn_t table_gfn;
282 int r; 282 int r;
283 int level; 283 int level;
@@ -313,17 +313,17 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
313 313
314 if (level == PT_DIRECTORY_LEVEL 314 if (level == PT_DIRECTORY_LEVEL
315 && gw->level == PT_DIRECTORY_LEVEL) { 315 && gw->level == PT_DIRECTORY_LEVEL) {
316 metaphysical = 1; 316 direct = 1;
317 if (!is_dirty_pte(gw->ptes[level - 1])) 317 if (!is_dirty_pte(gw->ptes[level - 1]))
318 access &= ~ACC_WRITE_MASK; 318 access &= ~ACC_WRITE_MASK;
319 table_gfn = gpte_to_gfn(gw->ptes[level - 1]); 319 table_gfn = gpte_to_gfn(gw->ptes[level - 1]);
320 } else { 320 } else {
321 metaphysical = 0; 321 direct = 0;
322 table_gfn = gw->table_gfn[level - 2]; 322 table_gfn = gw->table_gfn[level - 2];
323 } 323 }
324 shadow_page = kvm_mmu_get_page(vcpu, table_gfn, addr, level-1, 324 shadow_page = kvm_mmu_get_page(vcpu, table_gfn, addr, level-1,
325 metaphysical, access, sptep); 325 direct, access, sptep);
326 if (!metaphysical) { 326 if (!direct) {
327 r = kvm_read_guest_atomic(vcpu->kvm, 327 r = kvm_read_guest_atomic(vcpu->kvm,
328 gw->pte_gpa[level - 2], 328 gw->pte_gpa[level - 2],
329 &curr_pte, sizeof(curr_pte)); 329 &curr_pte, sizeof(curr_pte));
@@ -512,7 +512,7 @@ static void FNAME(prefetch_page)(struct kvm_vcpu *vcpu,
512 pt_element_t pt[256 / sizeof(pt_element_t)]; 512 pt_element_t pt[256 / sizeof(pt_element_t)];
513 gpa_t pte_gpa; 513 gpa_t pte_gpa;
514 514
515 if (sp->role.metaphysical 515 if (sp->role.direct
516 || (PTTYPE == 32 && sp->role.level > PT_PAGE_TABLE_LEVEL)) { 516 || (PTTYPE == 32 && sp->role.level > PT_PAGE_TABLE_LEVEL)) {
517 nonpaging_prefetch_page(vcpu, sp); 517 nonpaging_prefetch_page(vcpu, sp);
518 return; 518 return;