[PATCH v6 00/49] New Intel CPUID families

Tony Luck posted 49 patches 1 year, 7 months ago
There is a newer version of this series
.../atomisp/include/linux/atomisp_platform.h  |  27 +--
include/linux/mod_devicetable.h               |   4 +
include/linux/peci-cpu.h                      |  24 ++
include/linux/peci.h                          |   6 +-
include/linux/platform_data/x86/soc.h         |  12 +-
arch/x86/include/asm/cpu_device_id.h          |  30 +--
arch/x86/include/asm/intel-family.h           |  85 +------
drivers/char/tpm/tpm.h                        |   2 +-
drivers/char/tpm/tpm_tis_core.h               |   2 +-
drivers/peci/internal.h                       |   6 +-
arch/x86/boot/cpucheck.c                      |   2 +-
arch/x86/crypto/aesni-intel_glue.c            |  16 +-
arch/x86/crypto/poly1305_glue.c               |   4 +-
arch/x86/crypto/twofish_glue_3way.c           |  10 +-
arch/x86/events/intel/core.c                  | 212 +++++++++---------
arch/x86/events/rapl.c                        |  90 ++++----
arch/x86/kernel/cpu/intel.c                   | 108 +++++----
arch/x86/kernel/cpu/match.c                   |   4 +-
arch/x86/kvm/pmu.c                            |   8 +-
arch/x86/kvm/vmx/vmx.c                        |  20 +-
arch/x86/pci/intel_mid_pci.c                  |   4 +-
arch/x86/platform/atom/punit_atom_debug.c     |  11 +-
arch/x86/platform/intel-mid/intel-mid.c       |   7 +-
arch/x86/virt/vmx/tdx/tdx.c                   |   8 +-
drivers/acpi/x86/lpss.c                       |   4 +-
drivers/acpi/x86/utils.c                      |  44 ++--
drivers/cpufreq/intel_pstate.c                |  90 ++++----
drivers/cpufreq/speedstep-centrino.c          |   8 +-
drivers/edac/i10nm_base.c                     |  20 +-
drivers/edac/pnd2_edac.c                      |   4 +-
drivers/edac/sb_edac.c                        |  14 +-
drivers/edac/skx_base.c                       |   2 +-
drivers/extcon/extcon-axp288.c                |   2 +-
drivers/hwmon/peci/cputemp.c                  |   8 +-
drivers/idle/intel_idle.c                     | 116 +++++-----
drivers/pci/pci-mid.c                         |   4 +-
drivers/peci/core.c                           |   5 +-
drivers/peci/cpu.c                            |  21 +-
drivers/peci/device.c                         |   3 +-
drivers/platform/x86/intel/ifs/core.c         |  15 +-
drivers/platform/x86/intel/pmc/core.c         |  46 ++--
drivers/platform/x86/intel/pmc/pltdrv.c       |  16 +-
.../intel/speed_select_if/isst_if_common.c    |   8 +-
.../intel/speed_select_if/isst_if_mbox_msr.c  |   2 +-
.../platform/x86/intel/telemetry/debugfs.c    |   4 +-
drivers/platform/x86/intel/telemetry/pltdrv.c |   4 +-
drivers/platform/x86/intel/turbo_max_3.c      |   4 +-
.../intel/uncore-frequency/uncore-frequency.c |  56 ++---
drivers/platform/x86/intel_ips.c              |   3 +-
drivers/platform/x86/intel_scu_wdt.c          |   2 +-
drivers/platform/x86/p2sb.c                   |   2 +-
drivers/powercap/intel_rapl_common.c          | 120 +++++-----
drivers/powercap/intel_rapl_msr.c             |  16 +-
drivers/thermal/intel/intel_soc_dts_thermal.c |   2 +-
drivers/thermal/intel/intel_tcc_cooling.c     |  30 +--
sound/soc/intel/avs/boards/es8336.c           |   8 +-
tools/power/x86/turbostat/turbostat.c         | 165 ++++++++------
57 files changed, 740 insertions(+), 810 deletions(-)
[PATCH v6 00/49] New Intel CPUID families
Posted by Tony Luck 1 year, 7 months ago
tl;dr
- Please consider patches 0001 & 0002 as urgent to fix a regression.

- Middle set (0003..0047) are independent of each other (I think)
  and can be applied in ant order at a more lesisurely pace.

- Patches 0048 & 0049 cleanup unused macros *after* all the others
  have been applied.

Full cover letter here:
Link: https://lore.kernel.org/all/20240416211941.9369-1-tony.luck@intel.com/

This series also available with:
 $ git fetch git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git new_families_v6

Signed-off-by: Tony Luck <tony.luck@intel.com>

Changes since v5:
Link: https://lore.kernel.org/all/20240430164913.73473-1-tony.luck@intel.com/

Rebased to upstream v6.10 Linus merge tree on May 20th:
commit 72ece20127a3 ("Merge tag 'f2fs-for-6.10.rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs")

Found a regression with the use of "INTEL_ANY" to match from
any family (instead of just from family 6.

   Patch 0002 fixes this. See this link for previous discussion for
   fix. Link: https://lore.kernel.org/all/20240517172134.7255-1-tony.luck@intel.com/
   Patch 0001 must be applied along with this patch to fix the one
   spot in the kernel that doesn't use X86_MATCH*() macros to
   initialize things.

A handful of other patches have been updated to resolve conflicts
with changes pulled into the merge window from other trees.

Tony Luck (49):
  crypto: x86/aes-xts - Switch to new Intel CPU model defines
  x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL
  tpm: Switch to new Intel CPU model defines
  platform/x86/intel/ifs: Switch to new Intel CPU model defines
  media: atomisp: Switch to new Intel CPU model defines
  ASoC: Intel: avs: es8336: Switch to new Intel CPU model defines
  platform/x86: intel_scu_wdt: Switch to new Intel CPU model defines
  KVM: x86/pmu: Switch to new Intel CPU model defines
  KVM: VMX: Switch to new Intel CPU model defines
  cpufreq: Switch to new Intel CPU model defines
  intel_idle: Switch to new Intel CPU model defines
  PCI: PM: Switch to new Intel CPU model defines
  powercap: intel_rapl: Switch to new Intel CPU model defines
  ASoC: Intel: Switch to new Intel CPU model defines
  thermal: intel: intel_tcc_cooling: Switch to new Intel CPU model
    defines
  x86/platform/intel-mid: Switch to new Intel CPU model defines
  platform/x86: intel_speed_select_if: Switch to new Intel CPU model
    defines
  platform/x86: intel-uncore-freq: Switch to new Intel CPU model defines
  platform/x86: intel_ips: Switch to new Intel CPU model defines
  platform/x86: intel_telemetry: Switch to new Intel CPU model defines
  platform/x86: intel: telemetry: Switch to new Intel CPU model defines
  platform/x86: intel_turbo_max_3: Switch to new Intel CPU model defines
  platform/x86: p2sb: Switch to new Intel CPU model defines
  platform/x86/intel: pmc: Switch to new Intel CPU model defines
  platform/x86/intel/pmc: Switch to new Intel CPU model defines
  crypto: x86/poly1305 - Switch to new Intel CPU model defines
  crypto: x86/twofish - Switch to new Intel CPU model defines
  x86/cpu/intel: Switch to new Intel CPU model defines
  x86/PCI: Switch to new Intel CPU model defines
  x86/virt/tdx: Switch to new Intel CPU model defines
  perf/x86/intel: Switch to new Intel CPU model defines
  x86/platform/atom: Switch to new Intel CPU model defines
  x86/cpu: Switch to new Intel CPU model defines
  x86/boot: Switch to new Intel CPU model defines
  EDAC/i10nm: Switch to new Intel CPU model defines
  EDAC, pnd2: Switch to new Intel CPU model defines
  EDAC/sb_edac: Switch to new Intel CPU model defines
  EDAC/skx: Switch to new Intel CPU model defines
  extcon: axp288: Switch to new Intel CPU model defines
  ACPI: LPSS: Switch to new Intel CPU model defines
  ACPI: x86: Switch to new Intel CPU model defines
  cpufreq: intel_pstate: Switch to new Intel CPU model defines
  perf/x86/rapl: Switch to new Intel CPU model defines
  platform/x86: ISST: Switch to new Intel CPU model defines
  powercap: intel_rapl: Switch to new Intel CPU model defines
  tools/power/turbostat: Switch to new Intel CPU model defines
  peci, hwmon: Switch to new Intel CPU model defines
  x86/cpu/vfm: Delete X86_MATCH_INTEL_FAM6_MODEL[_STEPPING]() macros
  x86/cpu/vfm: Delete all the *_FAM6_ CPU #defines

 .../atomisp/include/linux/atomisp_platform.h  |  27 +--
 include/linux/mod_devicetable.h               |   4 +
 include/linux/peci-cpu.h                      |  24 ++
 include/linux/peci.h                          |   6 +-
 include/linux/platform_data/x86/soc.h         |  12 +-
 arch/x86/include/asm/cpu_device_id.h          |  30 +--
 arch/x86/include/asm/intel-family.h           |  85 +------
 drivers/char/tpm/tpm.h                        |   2 +-
 drivers/char/tpm/tpm_tis_core.h               |   2 +-
 drivers/peci/internal.h                       |   6 +-
 arch/x86/boot/cpucheck.c                      |   2 +-
 arch/x86/crypto/aesni-intel_glue.c            |  16 +-
 arch/x86/crypto/poly1305_glue.c               |   4 +-
 arch/x86/crypto/twofish_glue_3way.c           |  10 +-
 arch/x86/events/intel/core.c                  | 212 +++++++++---------
 arch/x86/events/rapl.c                        |  90 ++++----
 arch/x86/kernel/cpu/intel.c                   | 108 +++++----
 arch/x86/kernel/cpu/match.c                   |   4 +-
 arch/x86/kvm/pmu.c                            |   8 +-
 arch/x86/kvm/vmx/vmx.c                        |  20 +-
 arch/x86/pci/intel_mid_pci.c                  |   4 +-
 arch/x86/platform/atom/punit_atom_debug.c     |  11 +-
 arch/x86/platform/intel-mid/intel-mid.c       |   7 +-
 arch/x86/virt/vmx/tdx/tdx.c                   |   8 +-
 drivers/acpi/x86/lpss.c                       |   4 +-
 drivers/acpi/x86/utils.c                      |  44 ++--
 drivers/cpufreq/intel_pstate.c                |  90 ++++----
 drivers/cpufreq/speedstep-centrino.c          |   8 +-
 drivers/edac/i10nm_base.c                     |  20 +-
 drivers/edac/pnd2_edac.c                      |   4 +-
 drivers/edac/sb_edac.c                        |  14 +-
 drivers/edac/skx_base.c                       |   2 +-
 drivers/extcon/extcon-axp288.c                |   2 +-
 drivers/hwmon/peci/cputemp.c                  |   8 +-
 drivers/idle/intel_idle.c                     | 116 +++++-----
 drivers/pci/pci-mid.c                         |   4 +-
 drivers/peci/core.c                           |   5 +-
 drivers/peci/cpu.c                            |  21 +-
 drivers/peci/device.c                         |   3 +-
 drivers/platform/x86/intel/ifs/core.c         |  15 +-
 drivers/platform/x86/intel/pmc/core.c         |  46 ++--
 drivers/platform/x86/intel/pmc/pltdrv.c       |  16 +-
 .../intel/speed_select_if/isst_if_common.c    |   8 +-
 .../intel/speed_select_if/isst_if_mbox_msr.c  |   2 +-
 .../platform/x86/intel/telemetry/debugfs.c    |   4 +-
 drivers/platform/x86/intel/telemetry/pltdrv.c |   4 +-
 drivers/platform/x86/intel/turbo_max_3.c      |   4 +-
 .../intel/uncore-frequency/uncore-frequency.c |  56 ++---
 drivers/platform/x86/intel_ips.c              |   3 +-
 drivers/platform/x86/intel_scu_wdt.c          |   2 +-
 drivers/platform/x86/p2sb.c                   |   2 +-
 drivers/powercap/intel_rapl_common.c          | 120 +++++-----
 drivers/powercap/intel_rapl_msr.c             |  16 +-
 drivers/thermal/intel/intel_soc_dts_thermal.c |   2 +-
 drivers/thermal/intel/intel_tcc_cooling.c     |  30 +--
 sound/soc/intel/avs/boards/es8336.c           |   8 +-
 tools/power/x86/turbostat/turbostat.c         | 165 ++++++++------
 57 files changed, 740 insertions(+), 810 deletions(-)


base-commit: 72ece20127a366518d91c5ab8e9dd8bf7d7fdb2f
-- 
2.45.0
Re: [PATCH v6 00/49] New Intel CPUID families
Posted by Tony Luck 1 year, 6 months ago
x86 maintainers,

Thanks for taking thr first couple dozen patches and getting them
into v6.10-rc1.

I'm poking other subsysystem maintainers to pick up patches that
belong in their trees.

There seem to be around eight patches that still belong to x86
(at least that appears to be what scripts/get_maintainer.pl tells me).

Patch#	File
16	arch/x86/platform/intel-mid/intel-mid.c
28	arch/x86/kernel/cpu/intel.c
29	arch/x86/pci/intel_mid_pci.c
30	arch/x86/virt/vmx/tdx/tdx.c
31	x86/events/intel/core.c
33	arch/x86/include/asm/cpu_device_id.h
34	arch/x86/boot/cpucheck.c
43	arch/x86/events/rapl.c

-Tony
Re: [PATCH v6 00/49] New Intel CPUID families
Posted by Sean Christopherson 1 year, 6 months ago
On Mon, 20 May 2024 15:45:31 -0700, Tony Luck wrote:
> tl;dr
> - Please consider patches 0001 & 0002 as urgent to fix a regression.
> 
> - Middle set (0003..0047) are independent of each other (I think)
>   and can be applied in ant order at a more lesisurely pace.
> 
> - Patches 0048 & 0049 cleanup unused macros *after* all the others
>   have been applied.
> 
> [...]

Applied the KVM changes (08 and 09) to kvm-x86 pmu, thanks!

[08/49] KVM: x86/pmu: Switch to new Intel CPU model defines
        https://github.com/kvm-x86/linux/commit/8387435bebac
[09/49] KVM: VMX: Switch to new Intel CPU model defines
        https://github.com/kvm-x86/linux/commit/0c468a6a020c

--
https://github.com/kvm-x86/linux/tree/next
Re: [PATCH v6 00/49] New Intel CPUID families
Posted by Borislav Petkov 1 year, 7 months ago
On Mon, May 20, 2024 at 03:45:31PM -0700, Tony Luck wrote:
> tl;dr
> - Please consider patches 0001 & 0002 as urgent to fix a regression.

1 and 2?

Only 2 I think...

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
RE: [PATCH v6 00/49] New Intel CPUID families
Posted by Luck, Tony 1 year, 7 months ago
>> - Please consider patches 0001 & 0002 as urgent to fix a regression.
>>
>> 1 and 2?
>
> Only 2 I think...

Patch 2 fixes the existing regression. But if you apply just that patch it
will create a new regression. Patch 1 fixes the place where someone
isn't using the X86_MATCH macros. Just open coding:

   { .vendor = X86_VENDOR_INTEL, .family = 6, .model = INTEL_FAM6_SKYLAKE_X },

so they don't set .flags  Patch 2 changes x86_match_cpu() to just use flags as the
end marker for the array:

    for (m = match; m->flags & X86_CPU_ID_FLAG_ENTRY_VALID; m++) {

-Tony