RE: [PATCH v2 11/25] KVM: x86: Add kvm_is_fred_enabled()
From: Li, Xin3
Date: Fri May 10 2024 - 21:24:33 EST
> >+/*
> >+ * It's enough to check just CR4.FRED (X86_CR4_FRED) to tell if
> >+ * a vCPU is running with FRED enabled, because:
> >+ * 1) CR4.FRED can be set to 1 only _after_ IA32_EFER.LMA = 1.
> >+ * 2) To leave IA-32e mode, CR4.FRED must be cleared first.
> >+ *
> >+ * More details at FRED Spec 6.0 Section 4.2 Enabling in CR4.
> >+ */
>
> I think we can give more context here, e.g.,
>
> Although FRED architecture applies to 64-bit mode only, there is no need to check if
> the CPU is in 64-bit mode (i.e., IA32_EFER.LMA and CS.L) to tell if FRED is enabled
> because CR4.FRED=1 implies the CPU is in 64-bit mode.
What is "more context" here?
> Specifically,