diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2011-07-11 15:25:19 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-07-24 04:50:29 -0400 |
commit | b36c7a7c10bf845b623ce187501b561d1d843a18 (patch) | |
tree | 114092c6dd8bd2e3db31dbd5fb322015683482b9 /arch/x86 | |
parent | 640d9b0dbe9f744ac8fd517a8f6afe238f8f525b (diff) |
KVM: MMU: cleanup for FNAME(fetch)
gw->pte_access is the final access permission, since it is unified with
gw->pt_access when we walked guest page table:
FNAME(walk_addr_generic):
pte_access = pt_access & FNAME(gpte_access)(vcpu, pte, true);
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-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 c9fe97bd8c8..5c2aa406408 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -479,7 +479,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr, | |||
479 | if (!is_present_gpte(gw->ptes[gw->level - 1])) | 479 | if (!is_present_gpte(gw->ptes[gw->level - 1])) |
480 | return NULL; | 480 | return NULL; |
481 | 481 | ||
482 | direct_access = gw->pt_access & gw->pte_access; | 482 | direct_access = gw->pte_access; |
483 | 483 | ||
484 | top_level = vcpu->arch.mmu.root_level; | 484 | top_level = vcpu->arch.mmu.root_level; |
485 | if (top_level == PT32E_ROOT_LEVEL) | 485 | if (top_level == PT32E_ROOT_LEVEL) |
@@ -537,7 +537,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr, | |||
537 | link_shadow_page(it.sptep, sp); | 537 | link_shadow_page(it.sptep, sp); |
538 | } | 538 | } |
539 | 539 | ||
540 | mmu_set_spte(vcpu, it.sptep, access, gw->pte_access & access, | 540 | mmu_set_spte(vcpu, it.sptep, access, gw->pte_access, |
541 | user_fault, write_fault, ptwrite, it.level, | 541 | user_fault, write_fault, ptwrite, it.level, |
542 | gw->gfn, pfn, prefault, map_writable); | 542 | gw->gfn, pfn, prefault, map_writable); |
543 | FNAME(pte_prefetch)(vcpu, gw, it.sptep); | 543 | FNAME(pte_prefetch)(vcpu, gw, it.sptep); |