KVM: arm64: Fix detection of shared VMAs on guest fault
Marc Zyngier
maintainerPATCH 1/1 KVM: arm64: Fix detection of shared VMAs on guest fault
When merging the KVM MTE support, the blob that was interposed between the chair and the keyboard experienced a neuronal accident (also known as a brain fart), turning a check for VM_SHARED into VM_PFNMAP as it was reshuffling some of the code.
The blob having now come back to its senses, let's restore the initial check that the original author got right the first place.
--- arch/arm64/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kvm/mmu.c +1 -1
@@ -947,7 +947,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, vma_shift =get_vma_page_shift (vma, hva); } - shared = (vma->vm_flags &VM_PFNMAP ); + shared = (vma->vm_flags &VM_SHARED );switch (vma_shift) {#ifndef __PAGETABLE_PMD_FOLDED
Signature · 1 line
2.30.2
Quoted 5 lines · Marc Zyngier
When merging the KVM MTE support, the blob that was interposed between the chair and the keyboard experienced a neuronal accident (also known as a brain fart), turning a check for
VM_SHAREDintoVM_PFNMAPas it was reshuffling some of the code.
Quoted 7 lines
The blob having now come back to its senses, let's restore the initial check that the original author got right the first place.
Fixes ea7fc1bb1cd1 ("KVM: arm64: Introduce MTE VM feature")Cc Steven Price <[email protected]>Cc Catalin Marinas <[email protected]>Signed-off-by Marc Zyngier <[email protected]>
Somehow this blob missed it too while reviewing the changes you'd made.
Thanks,
Steve
Quoted 18 lines
--- arch/arm64/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/kvm/mmu.c +1
-1@@ -947,7 +947,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, vma_shift =get_vma_page_shift (vma, hva); } - shared = (vma->vm_flags &VM_PFNMAP ); + shared = (vma->vm_flags &VM_SHARED );switch (vma_shift) {#ifndef __PAGETABLE_PMD_FOLDED