]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Replace BUG_ON() with WARN_ON_ONCE() on "bad" nested GPA translation
authorSean Christopherson <seanjc@google.com>
Thu, 18 Jun 2026 18:57:45 +0000 (11:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 24 Jun 2026 09:25:21 +0000 (11:25 +0200)
commit39e9c35e447b8ab49ddbc826c40ca31a425e76b2
tree966c7aee52706fda989cb866a74dc43d0f8c3f1a
parentf1edbed787ba67988ed34e0132ca128b052b6ce8
KVM: x86: Replace BUG_ON() with WARN_ON_ONCE() on "bad" nested GPA translation

If KVM attempts to translate what it thinks is an L2 GPA with a non-nested
MMU, simply WARN and return the GPA, i.e. trust the MMU more than the
caller, as there is zero reason to potentially panic the host kernel just
because KVM misused an API.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Kai Huang <kai.huang@intel.com>
Message-ID: <20260618185746.2023283-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/vmx/nested.c