Commit 871bd034 authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini

KVM: x86: Rename access permissions cache member in struct kvm_vcpu_arch

Rename "access" to "mmio_access" to match the other MMIO cache members
and to make it more obvious that it's tracking the access permissions
for the MMIO cache.
Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent c8e16b78
...@@ -294,7 +294,7 @@ Handling a page fault is performed as follows: ...@@ -294,7 +294,7 @@ Handling a page fault is performed as follows:
- walk shadow page table - walk shadow page table
- check for valid generation number in the spte (see "Fast invalidation of - check for valid generation number in the spte (see "Fast invalidation of
MMIO sptes" below) MMIO sptes" below)
- cache the information to vcpu->arch.mmio_gva, vcpu->arch.access and - cache the information to vcpu->arch.mmio_gva, vcpu->arch.mmio_access and
vcpu->arch.mmio_gfn, and call the emulator vcpu->arch.mmio_gfn, and call the emulator
- If both P bit and R/W bit of error code are set, this could possibly - If both P bit and R/W bit of error code are set, this could possibly
be handled as a "fast page fault" (fixed without taking the MMU lock). See be handled as a "fast page fault" (fixed without taking the MMU lock). See
...@@ -304,7 +304,7 @@ Handling a page fault is performed as follows: ...@@ -304,7 +304,7 @@ Handling a page fault is performed as follows:
- if permissions are insufficient, reflect the fault back to the guest - if permissions are insufficient, reflect the fault back to the guest
- determine the host page - determine the host page
- if this is an mmio request, there is no host page; cache the info to - if this is an mmio request, there is no host page; cache the info to
vcpu->arch.mmio_gva, vcpu->arch.access and vcpu->arch.mmio_gfn vcpu->arch.mmio_gva, vcpu->arch.mmio_access and vcpu->arch.mmio_gfn
- walk the shadow page table to find the spte for the translation, - walk the shadow page table to find the spte for the translation,
instantiating missing intermediate page tables as necessary instantiating missing intermediate page tables as necessary
- If this is an mmio request, cache the mmio info to the spte and set some - If this is an mmio request, cache the mmio info to the spte and set some
......
...@@ -717,7 +717,7 @@ struct kvm_vcpu_arch { ...@@ -717,7 +717,7 @@ struct kvm_vcpu_arch {
/* Cache MMIO info */ /* Cache MMIO info */
u64 mmio_gva; u64 mmio_gva;
unsigned access; unsigned mmio_access;
gfn_t mmio_gfn; gfn_t mmio_gfn;
u64 mmio_gen; u64 mmio_gen;
......
...@@ -5377,7 +5377,7 @@ static int vcpu_mmio_gva_to_gpa(struct kvm_vcpu *vcpu, unsigned long gva, ...@@ -5377,7 +5377,7 @@ static int vcpu_mmio_gva_to_gpa(struct kvm_vcpu *vcpu, unsigned long gva,
*/ */
if (vcpu_match_mmio_gva(vcpu, gva) if (vcpu_match_mmio_gva(vcpu, gva)
&& !permission_fault(vcpu, vcpu->arch.walk_mmu, && !permission_fault(vcpu, vcpu->arch.walk_mmu,
vcpu->arch.access, 0, access)) { vcpu->arch.mmio_access, 0, access)) {
*gpa = vcpu->arch.mmio_gfn << PAGE_SHIFT | *gpa = vcpu->arch.mmio_gfn << PAGE_SHIFT |
(gva & (PAGE_SIZE - 1)); (gva & (PAGE_SIZE - 1));
trace_vcpu_match_mmio(gva, *gpa, write, false); trace_vcpu_match_mmio(gva, *gpa, write, false);
......
...@@ -196,7 +196,7 @@ static inline void vcpu_cache_mmio_info(struct kvm_vcpu *vcpu, ...@@ -196,7 +196,7 @@ static inline void vcpu_cache_mmio_info(struct kvm_vcpu *vcpu,
* actually a nGPA. * actually a nGPA.
*/ */
vcpu->arch.mmio_gva = mmu_is_nested(vcpu) ? 0 : gva & PAGE_MASK; vcpu->arch.mmio_gva = mmu_is_nested(vcpu) ? 0 : gva & PAGE_MASK;
vcpu->arch.access = access; vcpu->arch.mmio_access = access;
vcpu->arch.mmio_gfn = gfn; vcpu->arch.mmio_gfn = gfn;
vcpu->arch.mmio_gen = gen; vcpu->arch.mmio_gen = gen;
} }
......
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