From: Quentin Perret Date: Wed, 16 Apr 2025 16:08:58 +0000 (+0000) Subject: KVM: arm64: Don't WARN from __pkvm_host_share_guest() X-Git-Tag: v6.16-rc1~129^2~2^2~6^2~10^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=845f126732a8126dee3f15855487121f4836131a;p=thirdparty%2Fkernel%2Fstable.git KVM: arm64: Don't WARN from __pkvm_host_share_guest() We currently WARN() if the host attempts to share a page that is not in an acceptable state with a guest. This isn't strictly necessary and makes testing much harder, so drop the WARN and make sure to propage the error code instead. Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20250416160900.3078417-3-qperret@google.com Signed-off-by: Marc Zyngier --- diff --git a/arch/arm64/kvm/hyp/nvhe/mem_protect.c b/arch/arm64/kvm/hyp/nvhe/mem_protect.c index 2a5284f749b42..cf6207aa1434f 100644 --- a/arch/arm64/kvm/hyp/nvhe/mem_protect.c +++ b/arch/arm64/kvm/hyp/nvhe/mem_protect.c @@ -919,7 +919,6 @@ int __pkvm_host_share_guest(u64 pfn, u64 gfn, struct pkvm_hyp_vcpu *vcpu, if (page->host_share_guest_count) break; /* Only host to np-guest multi-sharing is tolerated */ - WARN_ON(1); fallthrough; default: ret = -EPERM;