Re: [PATCH v8 09/20] KVM: nVMX: Propagate extended instruction information
From: Jim Mattson
Date: Thu Nov 05 2026 - 19:53:27 EST
On Wed, Sep 30, 2026 at 2:37 PM Chang S. Bae <chang.seok.bae@xxxxxxxxx> wrote:
>
> Define the new extended_instruction_info field in struct vmcs12 and
> propagate it to nested VMX. Gate the propagation on the guest APX
> enumeration, which aligns with bare metal behavior. Thus, define the
> CPUID bit here too.
>
> Suggested-by: Chao Gao <chao.gao@xxxxxxxxx>
> Tested-by: Zhao Liu <zhao1.liu@xxxxxxxxx>
> Signed-off-by: Chang S. Bae <chang.seok.bae@xxxxxxxxx>
> Link: https://lore.kernel.org/aRvOSnaUt1E+%2FpkC@xxxxxxxxx
> ---
[ ... ]
> diff --git a/arch/x86/kvm/vmx/vmcs12.c b/arch/x86/kvm/vmx/vmcs12.c
> index 1ebe67c384ad..267aa64f005e 100644
> --- a/arch/x86/kvm/vmx/vmcs12.c
> +++ b/arch/x86/kvm/vmx/vmcs12.c
> @@ -53,6 +53,7 @@ static const u16 kvm_supported_vmcs12_field_offsets[] __initconst = {
> FIELD64(XSS_EXIT_BITMAP, xss_exit_bitmap),
> FIELD64(ENCLS_EXITING_BITMAP, encls_exiting_bitmap),
> FIELD64(GUEST_PHYSICAL_ADDRESS, guest_physical_address),
> + FIELD64(EXTENDED_INSTRUCTION_INFO, extended_instruction_info),
You need to add a case for VMCS12_CASE64(EXTENDED_INSTRUCTION_INFO) to
cpu_has_vmcs12_field().