Re: [PATCH v7 16/21] KVM: x86: Advertise support for FRED
From: Sean Christopherson
Date: Fri Mar 06 2026 - 21:15:34 EST
On Fri, Aug 29, 2025, Xin Li (Intel) wrote:
> From: Xin Li <xin3.li@xxxxxxxxx>
>
> Advertise support for FRED to userspace after changes required to enable
> FRED in a KVM guest are in place.
Mostly a note to myself, if VMX and SVM land separately, we need to do the same
thing we did for CET and explicitly clear FRED in svm_set_cpu_caps(). But ideally
this would just be the last patch after both VMX and SVM support are in place.
> Signed-off-by: Xin Li <xin3.li@xxxxxxxxx>
> Signed-off-by: Xin Li (Intel) <xin@xxxxxxxxx>
> Tested-by: Shan Kang <shan.kang@xxxxxxxxx>
> Tested-by: Xuelian Guo <xuelian.guo@xxxxxxxxx>
> ---
>
> Change in v5:
> * Don't advertise FRED/LKGS together, LKGS can be advertised as an
> independent feature (Sean).
> * Add TB from Xuelian Guo.
> ---
> arch/x86/kvm/cpuid.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index ee05b876c656..1f15aad02c68 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -994,6 +994,7 @@ void kvm_set_cpu_caps(void)
> F(FSRS),
> F(FSRC),
> F(WRMSRNS),
> + X86_64_F(FRED),
> X86_64_F(LKGS),
> F(AMX_FP16),
> F(AVX_IFMA),
> --
> 2.51.0
>