Re: [PATCH v10 22/28] KVM: nVMX: Restrict event data VMCS fields to FRED-supported hosts
From: Sohil Mehta
Date: Wed Nov 18 2026 - 20:15:50 EST
On 11/4/2026 5:32 AM, Chao Gao wrote:
> On Wed, Nov 04, 2026 at 02:57:45PM +0800, Binbin Wu wrote:
>> On 9/12/2026 5:36 AM, Sohil Mehta wrote:
>>> From: Xin Li <xin@xxxxxxxxx>
>>>
>>> Prevent L1 from accessing the ORIGINAL_EVENT_DATA and INJECTED_EVENT_DATA
>>> VMCS fields via VMREAD or VMWRITE when FRED support is disabled or not
>>> present in KVM.
>>
>> I think the change log should tell why the patch only restricts event data
>> fields.
>
> Sean preferred an "unconditional" rule for cpu_has_vmcs12_field() [1],
> i.e., new fields are added there whether or not they are shadowed.
> Following that rule, this patch should cover all FRED VMCS fields.
>
Sure, will add all the FRED fields.
I think we should also include the secondary VM exit controls case in
the nVMX patch that adds it:
VMCS12_CASE64(SECONDARY_VM_EXIT_CONTROLS):
return cpu_has_secondary_vmexit_ctrls();