Re: [PATCH v10 08/38] x86/cpufeatures: Add the cpu feature bit for FRED

Jan Beulich
2023-09-14T06:09:58Z

On 14.09.2023 08:03, Juergen Gross wrote:
> On 14.09.23 06:47, Xin Li wrote:
>> From: "H. Peter Anvin (Intel)" <hpa@zytor.com>
>>
>> Any FRED CPU will always have the following features as its baseline:
>> 1) LKGS, load attributes of the GS segment but the base address into
>> the IA32_KERNEL_GS_BASE MSR instead of the GS segment’s descriptor
>> cache.
>> 2) WRMSRNS, non-serializing WRMSR for faster MSR writes.
>>
>> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
>> Tested-by: Shan Kang <shan.kang@intel.com>
>> Signed-off-by: Xin Li <xin3.li@intel.com>
>
> In order to avoid having to add paravirt support for FRED I think
> xen_init_capabilities() should gain:
>
> + setup_clear_cpu_cap(X86_FEATURE_FRED);

I don't view it as very likely that Xen would expose FRED to PV guests
(Andrew?), at which point such a precaution may not be necessary.

Jan