Re: [PATCH RFC v1 07/20] KVM: nVMX: Support the extended instruction info field
From: Chao Gao
Date: Mon Nov 17 2025 - 20:39:57 EST
On Tue, Nov 18, 2025 at 12:29:19AM +0100, Paolo Bonzini wrote:
>Il mer 12 nov 2025, 02:54 Chao Gao <chao.gao@xxxxxxxxx> ha scritto:
>>
>> Shouldn't we check guest's capabilities rather than host's,
>>
>> i.e., guest_cpu_cap_has(X86_FEATURE_APX)?
>
>As the manual says, you're free to use the extended field if
>available, and it's faster.
The point is, from the guest's perspective, the field is available iff the vCPU
supports APX. KVM (L0) doesn't need to virtualize VMCS12's EII field if the vCPU
doesn't have APX.
For other call sites of vmx_egpr_enabled(), I agree we should just check host
capabilities.