> + /*
> + * TODO: When the Linux kernel introduces other existing definitions
> + * for this leaf, remember to update the definitions here.
> + */
This TODO seems a bit vague; it's best to explicitly list the existing
features that are currently missing. Otherwise, maintainers won't be
able to understand or clean up this TODO either.
> + .features[FEAT_C000_0001_EDX] =
> + CPUID_C000_0001_EDX_PMM_EN | CPUID_C000_0001_EDX_PMM |
> + CPUID_C000_0001_EDX_PHE_EN | CPUID_C000_0001_EDX_PHE |
> + CPUID_C000_0001_EDX_ACE2 |
> + CPUID_C000_0001_EDX_XCRYPT_EN | CPUID_C000_0001_EDX_XCRYPT |
> + CPUID_C000_0001_EDX_XSTORE_EN | CPUID_C000_0001_EDX_XSTORE,
...
> + .model_id = "Zhaoxin Shijidadao-Client Processor",
> + .cache_info = &shijidadao_cache_info,
> + .versions = (X86CPUVersionDefinition[]) {
> + { .version = 1 },
> + {
> + .version = 2,
> + .note = "with more XSAVE features",
it's better to mention "without smap" as well.
(Based based on my personal experience, the absence of SMAP seems a bit
odd. Could it be a hardware bug in a specific stepping?)
> + .props = (PropValue[]) {
> + { "xsavec", "on" },
> + { "xgetbv1", "on" },
> + { "xsaves", "on"},
> + { "vmx-xsaves", "on"},
> + { "smap", "off" },
> + { /* end of list */ }
> + },
> + },
BTW, if the differences aren't too significant, is it possible to merge
the server and client models? :)
Thanks,
Zhao