Skip to contentSkip to conversation

KVM: x86/mmu: kvm_faultin_pfn has to return false if pfh is returned

PATCH In review Andrei Vagin 2 participants 2 messages Mar 11, 2022 – Mar 12, 2022 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: x86/mmu: kvm_faultin_pfn has to return false if pfh is returned

[ Upstream commit a7cc099f2ec3117678adeb69749bef7e9dde3148 ]

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 <[email protected]>
Cc Paolo Bonzini <[email protected]>

Message-Id: <[email protected]>

---
 arch/x86/kvm/mmu/mmu.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kvm/mmu/mmu.c +1 -0
index 2297dd90fe4a..d6579bae25ca 100644
@@ -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;
Signature · 1 line
2.35.1
#1 lore raw
Quoted 32 lines · Andrei Vagin

[ Upstream commit a7cc099f2ec3117678adeb69749bef7e9dde3148 ]

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 <[email protected]>
Cc Paolo Bonzini <[email protected]>

Message-Id: <[email protected]>

---
 arch/x86/kvm/mmu/mmu.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kvm/mmu/mmu.c +1 -0
index 2297dd90fe4a..d6579bae25ca 100644
@@ -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;
Signature · 1 line
2.35.1

Now queued up, thanks.

greg k-h