]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: nVMX: Allow the caller to provide instruction length on nested VM-Exit
authorSean Christopherson <seanjc@google.com>
Sat, 1 Feb 2025 01:55:16 +0000 (17:55 -0800)
committerSean Christopherson <seanjc@google.com>
Mon, 24 Feb 2025 17:01:07 +0000 (09:01 -0800)
commitfbd1e0f195464a362c91e16b5c327db0e89612ca
treeed935f57dd6de3bfb4dd70c610ca9a31e9525bf9
parentd4aea23fd0ff6d792f66886bcb158e52a095b3bc
KVM: nVMX: Allow the caller to provide instruction length on nested VM-Exit

Rework the nested VM-Exit helper to take the instruction length as a
parameter, and convert nested_vmx_vmexit() into a "default" wrapper that
grabs the length from vmcs02 as appropriate.  This will allow KVM to set
the correct instruction length when synthesizing a nested VM-Exit when
emulating an instruction that L1 wants to intercept.

No functional change intended, as the path to prepare_vmcs12()'s reading
of vmcs02.VM_EXIT_INSTRUCTION_LEN is gated on the same set of conditions
as the VMREAD in the new nested_vmx_vmexit().

Link: https://lore.kernel.org/r/20250201015518.689704-10-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/nested.h