diff options
author | Avi Kivity <avi@redhat.com> | 2012-09-19 12:33:48 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-09-20 06:00:10 -0400 |
commit | c5421519f30bd5ed77857a78de6dc8414385e602 (patch) | |
tree | 313fee0269d75f0dd5146762dd32c78b8ced4f75 /arch | |
parent | b514c30f7729b66af481fde3c1225e832e339d5b (diff) |
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: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/paging_tmpl.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 810c1da2ee44..714e2c01a6fe 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h | |||
@@ -160,7 +160,6 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker, | |||
160 | u16 errcode = 0; | 160 | u16 errcode = 0; |
161 | gpa_t real_gpa; | 161 | gpa_t real_gpa; |
162 | gfn_t gfn; | 162 | gfn_t gfn; |
163 | u32 ac; | ||
164 | 163 | ||
165 | trace_kvm_mmu_pagetable_walk(addr, access); | 164 | trace_kvm_mmu_pagetable_walk(addr, access); |
166 | retry_walk: | 165 | retry_walk: |
@@ -242,9 +241,7 @@ retry_walk: | |||
242 | if (PTTYPE == 32 && walker->level == PT_DIRECTORY_LEVEL && is_cpuid_PSE36()) | 241 | if (PTTYPE == 32 && walker->level == PT_DIRECTORY_LEVEL && is_cpuid_PSE36()) |
243 | gfn += pse36_gfn_delta(pte); | 242 | gfn += pse36_gfn_delta(pte); |
244 | 243 | ||
245 | ac = write_fault | fetch_fault | user_fault; | 244 | real_gpa = mmu->translate_gpa(vcpu, gfn_to_gpa(gfn), access); |
246 | |||
247 | real_gpa = mmu->translate_gpa(vcpu, gfn_to_gpa(gfn), ac); | ||
248 | if (real_gpa == UNMAPPED_GVA) | 245 | if (real_gpa == UNMAPPED_GVA) |
249 | return 0; | 246 | return 0; |
250 | 247 | ||