]> git.hungrycats.org Git - linux/commit
KVM: VMX: Preserve negative return value in vmx_handle_exit() with bus lock detected
authorXiaoyao Li <xiaoyao.li@intel.com>
Wed, 19 Aug 2026 09:49:00 +0000 (17:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Nov 2026 17:10:48 +0000 (12:10 -0500)
commit0a751ea342e36aec367a915e38373a32b32870eb
tree85a9801d6efced7929067388b7c12f73221949f1
parentb8fbd8c259c0b13811e1d81c1d89afdbbdf5b2d7
KVM: VMX: Preserve negative return value in vmx_handle_exit() with bus lock detected

commit cef48693da1e964e9f192bfc16cd0ed287c48337 upstream.

Preserve the negative return value from __vmx_handle_exit() when a bus
lock is detected, instead of always overwriting it with 0.

The purpose of bus_lock_detected handling is to force a userspace exit to
inform userspace that a bus lock happened. The negative return value can
achieve this purpose, and changing the negative value to 0 fails to return
an error to userspace. So, preserve the negative return value.

Fixes: fe6b6bc802b4 ("KVM: VMX: Enable bus lock VM exit")
Cc: stable@vger.kernel.org
Reported-by: sashiko-bot@kernel.org
Closes: https://lore.kernel.org/all/20260805034602.5B2BB1F000E9@smtp.kernel.org/
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://patch.msgid.link/20260819094903.3060020-7-xiaoyao.li@intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx/vmx.c