Commit c5421519 authored by Avi Kivity's avatar Avi Kivity

KVM: MMU: Eliminate pointless temporary 'ac'

'ac' essentially reconstructs the 'access' variable we already
have, except for the PFERR_PRESENT_MASK and PFERR_RSVD_MASK.  As
these are not used by callees, just use 'access' directly.
Reviewed-by: default avatarXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent b514c30f
...@@ -160,7 +160,6 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker, ...@@ -160,7 +160,6 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,
u16 errcode = 0; u16 errcode = 0;
gpa_t real_gpa; gpa_t real_gpa;
gfn_t gfn; gfn_t gfn;
u32 ac;
trace_kvm_mmu_pagetable_walk(addr, access); trace_kvm_mmu_pagetable_walk(addr, access);
retry_walk: retry_walk:
...@@ -242,9 +241,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker, ...@@ -242,9 +241,7 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,
if (PTTYPE == 32 && walker->level == PT_DIRECTORY_LEVEL && is_cpuid_PSE36()) if (PTTYPE == 32 && walker->level == PT_DIRECTORY_LEVEL && is_cpuid_PSE36())
gfn += pse36_gfn_delta(pte); gfn += pse36_gfn_delta(pte);
ac = write_fault | fetch_fault | user_fault; real_gpa = mmu->translate_gpa(vcpu, gfn_to_gpa(gfn), access);
real_gpa = mmu->translate_gpa(vcpu, gfn_to_gpa(gfn), ac);
if (real_gpa == UNMAPPED_GVA) if (real_gpa == UNMAPPED_GVA)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment