Patch "x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-cpu-vfm-add-initialize-x86_vfm-field-to-struct-c.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ada5574116ee624d90d514b113a3594f2fef33c0
Author: Tony Luck <tony.luck@xxxxxxxxx>
Date:   Tue Apr 16 14:19:03 2024 -0700

    x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86
    
    [ Upstream commit a9d0adce69075192961f3be466c4810a21b7bc9e ]
    
    Refactor struct cpuinfo_x86 so that the vendor, family, and model
    fields are overlaid in a union with a 32-bit field that combines
    all three (together with a one byte reserved field in the upper
    byte).
    
    This will make it easy, cheap, and reliable to check all three
    values at once.
    
    See
    
      https://lore.kernel.org/r/Zgr6kT8oULbnmEXx@agluck-desk3
    
    for why the ordering is (low-to-high bits):
    
      (vendor, family, model)
    
      [ bp: Move comments over the line, add the backstory about the
        particular order of the fields. ]
    
    Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
    Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
    Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240416211941.9369-2-tony.luck@xxxxxxxxx
    Stable-dep-of: c9a4b55431e5 ("x86/cpu: Add Lunar Lake to list of CPUs with a broken MONITOR implementation")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index 6e775303d687..428348e7f06c 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -81,9 +81,23 @@ extern u16 __read_mostly tlb_lld_1g[NR_INFO];
  */
 
 struct cpuinfo_x86 {
-	__u8			x86;		/* CPU family */
-	__u8			x86_vendor;	/* CPU vendor */
-	__u8			x86_model;
+	union {
+		/*
+		 * The particular ordering (low-to-high) of (vendor,
+		 * family, model) is done in case range of models, like
+		 * it is usually done on AMD, need to be compared.
+		 */
+		struct {
+			__u8	x86_model;
+			/* CPU family */
+			__u8	x86;
+			/* CPU vendor */
+			__u8	x86_vendor;
+			__u8	x86_reserved;
+		};
+		/* combined vendor, family, model */
+		__u32		x86_vfm;
+	};
 	__u8			x86_stepping;
 #ifdef CONFIG_X86_64
 	/* Number of 4K pages in DTLB/ITLB combined(in pages): */




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux