[PATCH 0/2] KVM: nVMX: Don't clobber VM-Entry instruction length on soft INTn exits
From: ma . mandourr
Date: Wed Oct 21 2026 - 00:26:15 EST
From: Mahmoud Abumandour <ma.mandourr@xxxxxxxxx>
KVM writes the length of a soft INTn that L2 was vectoring at the time of
a nested VM-Exit into vmcs12's VM-Entry instruction length, an L1-owned
control, instead of the VM-Exit instruction length. Patch 1 fixes it and
patch 2 adds a selftest.
Found with a fuzzer for VMX isolation. The selftest patch was written with
the help of an LLM coding assistant (Claude Opus 5.5). kvm-x86/next was
run as a nested hypervisor under QEMU. The selftest passes only with
patch 1, and other nested VMX selftests are unaffected.
Mahmoud Abumandour (2):
KVM: nVMX: Don't clobber VM-Entry instruction length when saving soft
INTn
KVM: selftests: Add test for nested VM-Exits while vectoring soft INTs
arch/x86/kvm/vmx/nested.c | 2 +-
tools/testing/selftests/kvm/Makefile.kvm | 1 +
.../kvm/x86/vmx_soft_int_vectoring_test.c | 105 ++++++++++++++++++
3 files changed, 107 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/kvm/x86/vmx_soft_int_vectoring_test.c
base-commit: dea4f6380f4ec96e8f3b0aaf2343764bd0d25ef4
--
2.43.0