summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2021-07-13 14:36:41 +0300
committerMarc Zyngier <maz@kernel.org>2021-07-14 11:49:10 +0300
commit80d9ac9bd7b9366c2a89d2716a397749299728e7 (patch)
treea22c8f1610fe0bab7abab02d69061067dd4f4d33
parente73f0f0ee7541171d89f2e2491130c7771ba58d3 (diff)
downloadlinux-80d9ac9bd7b9366c2a89d2716a397749299728e7.tar.xz
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. Fixes: ea7fc1bb1cd1 ("KVM: arm64: Introduce MTE VM feature") Reviewed-by: Steven Price <steven.price@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Link: https://lore.kernel.org/r/20210713114804.594993-1-maz@kernel.org
-rw-r--r--arch/arm64/kvm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index 3155c9e778f0..0625bf2353c2 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -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