Re: [PATCH v3A 1/6] target/i386: add support for FRED in CPUID enumeration

Liu, Zhao1
2023-12-22T08:35:08Z

On Fri, Dec 22, 2023 at 08:24:52AM +0000, Li, Xin3 wrote:
> Date: Fri, 22 Dec 2023 08:24:52 +0000
> From: "Li, Xin3" <xin3.li@intel.com>
> Subject: RE: [PATCH v3A 1/6] target/i386: add support for FRED in CPUID
> enumeration
>
>
> > > > NULL, NULL, NULL, NULL, @@ -1552,6 +1552,14 @@ static
> > > > FeatureDep feature_dependencies[] = {
> > > > .from = { FEAT_VMX_SECONDARY_CTLS,
> > VMX_SECONDARY_EXEC_ENABLE_USER_WAIT_PAUSE },
> > > > .to = { FEAT_7_0_ECX, CPUID_7_0_ECX_WAITPKG },
> > > > },
> > > > + {
> > > > + .from = { FEAT_7_1_EAX, CPUID_7_1_EAX_LKGS },
> > > > + .to = { FEAT_7_1_EAX, CPUID_7_1_EAX_FRED },
> > > > + },
> > > > + {
> > > > + .from = { FEAT_7_1_EAX, CPUID_7_1_EAX_WRMSRNS },
> > > > + .to = { FEAT_7_1_EAX, CPUID_7_1_EAX_FRED },
> > > > + },
> >
> > Oh, sorry, one thing that comes to mind, is this dependency required?
> > Since the FRED spec (v3.0) is all about WRMSR as the example, without
> > mentioning WRMSRNS, could there be other implementations that depend on
> > WRMSR instead of WRMSRNS?
>
> This is a community ask from tglx:
> https://lkml.kernel.org/kvm/87y1h81ht4.ffs@tglx/
>
> Boris had the same question:
> https://lore.kernel.org/lkml/20231114050201.GAZVL%2FSd%2FyLIdON9la@fat_crate.local/
>
> But it needs to go through a formal approach, which takes time, to reach
> the FRED public spec.
>

Thanks Xin! You can add a simple note in the commit message, such as
FRED's dependency on WRMSRNS will be documented, to avoid confusion
for later reviewers interested in FRED.

Regards,
Zhao