summaryrefslogtreecommitdiff
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@gmail.com>2021-10-15 19:32:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-16 16:23:43 +0300
commita633bc01333352975157c87fa7edc2542375e2e2 (patch)
tree9de4f2c2935c6f1e59b38450cdb7014952adab62 /arch/x86/kvm
parent2c1f97af38be151527380796d31d3c9adb054bf9 (diff)
downloadlinux-a633bc01333352975157c87fa7edc2542375e2e2.tar.xz
KVM: x86/mmu: kvm_faultin_pfn has to return false if pfh is returned
commit a7cc099f2ec3117678adeb69749bef7e9dde3148 upstream. This looks like a typo in 8f32d5e563cb. This change didn't intend to do any functional changes. The problem was caught by gVisor tests. Fixes: 8f32d5e563cb ("KVM: x86/mmu: allow kvm_faultin_pfn to return page fault handling code") Cc: Maxim Levitsky <mlevitsk@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andrei Vagin <avagin@gmail.com> Message-Id: <20211015163221.472508-1-avagin@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/mmu/mmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 2297dd90fe4a..d6579bae25ca 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -3967,6 +3967,7 @@ static bool kvm_faultin_pfn(struct kvm_vcpu *vcpu, bool prefault, gfn_t gfn,
*pfn = __gfn_to_pfn_memslot(slot, gfn, false, NULL,
write, writable, hva);
+ return false;
out_retry:
*r = RET_PF_RETRY;