[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86: Rearrange struct cpuinfo_x86 to introduce a vfm field
commit 673c56347713c1f87a1c88613d03de768f690de6 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Jul 15 20:15:18 2025 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Jul 17 18:54:49 2025 +0100 x86: Rearrange struct cpuinfo_x86 to introduce a vfm field Intel have run out of model space in Family 6 and will start using Family 19 starting with Diamond Rapids. Xen, like Linux, has model checking logic which will malfunction owing to bad assumptions about the family field. Reorder the family, vendor and model fields so they can be accessed together as a single vfm field. As we're cleaning up the logic, take the opportunity to introduce better names, dropping the x86 prefix. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/include/asm/cpufeature.h | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/include/asm/cpufeature.h b/xen/arch/x86/include/asm/cpufeature.h index 56d6ed1a87..4d45f14da4 100644 --- a/xen/arch/x86/include/asm/cpufeature.h +++ b/xen/arch/x86/include/asm/cpufeature.h @@ -20,10 +20,30 @@ #ifndef __ASSEMBLY__ struct cpuinfo_x86 { - unsigned char x86; /* CPU family */ - unsigned char x86_vendor; /* CPU vendor */ - unsigned char x86_model; - unsigned char x86_mask; + /* TODO: Phase out the x86 prefixed names. */ + union { + struct { + union { + uint8_t x86_model; + uint8_t model; + }; + union { + uint8_t x86; + uint8_t family; + }; + union { + uint8_t x86_vendor; + uint8_t vendor; + }; + uint8_t _rsvd; + }; + uint32_t vfm; /* Vendor Family Model */ + }; + union { + uint8_t x86_mask; + uint8_t stepping; + }; + unsigned int cpuid_level; /* Maximum supported CPUID level */ unsigned int extended_cpuid_level; /* Maximum supported CPUID extended level */ unsigned int x86_capability[NCAPINTS]; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |