tools arch x86: Sync the msr-index.h copy with the kernel sources
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 21 Dec 2020 12:07:36 +0000 (09:07 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 24 Dec 2020 12:24:19 +0000 (09:24 -0300)
commitfde668244d1d8d490b5b9daf53fe4f92a6751773
tree5d1c4ac19ea58491d99e95a8aa688425a19bc799
parent7f3905f00a2025591a6883ee6880f928029b4d96
tools arch x86: Sync the msr-index.h copy with the kernel sources

To pick up the changes in:

Fixes: 69372cf01290b958 ("x86/cpu: Add VM page flush MSR availablility as a CPUID feature")

That cause these changes in tooling:

  $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before
  $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h
  $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after
  $ diff -u before after
  --- before 2020-12-21 09:09:05.593005003 -0300
  +++ after 2020-12-21 09:12:48.436994802 -0300
  @@ -21,7 +21,7 @@
    [0x0000004f] = "PPIN",
    [0x00000060] = "LBR_CORE_TO",
    [0x00000079] = "IA32_UCODE_WRITE",
  - [0x0000008b] = "IA32_UCODE_REV",
  + [0x0000008b] = "AMD64_PATCH_LEVEL",
    [0x0000008C] = "IA32_SGXLEPUBKEYHASH0",
    [0x0000008D] = "IA32_SGXLEPUBKEYHASH1",
    [0x0000008E] = "IA32_SGXLEPUBKEYHASH2",
  @@ -286,6 +286,7 @@
    [0xc0010114 - x86_AMD_V_KVM_MSRs_offset] = "VM_CR",
    [0xc0010115 - x86_AMD_V_KVM_MSRs_offset] = "VM_IGNNE",
    [0xc0010117 - x86_AMD_V_KVM_MSRs_offset] = "VM_HSAVE_PA",
  + [0xc001011e - x86_AMD_V_KVM_MSRs_offset] = "AMD64_VM_PAGE_FLUSH",
    [0xc001011f - x86_AMD_V_KVM_MSRs_offset] = "AMD64_VIRT_SPEC_CTRL",
    [0xc0010130 - x86_AMD_V_KVM_MSRs_offset] = "AMD64_SEV_ES_GHCB",
    [0xc0010131 - x86_AMD_V_KVM_MSRs_offset] = "AMD64_SEV",
  $

The new MSR has a pattern that wasn't matched to avoid a clash with
IA32_UCODE_REV, change the regex to prefer the more relevant AMD_
prefixed ones to catch this new AMD64_VM_PAGE_FLUSH MSR.

Which causes these parts of tools/perf/ to be rebuilt:

  CC       /tmp/build/perf/trace/beauty/tracepoints/x86_msr.o
  LD       /tmp/build/perf/trace/beauty/tracepoints/perf-in.o
  LD       /tmp/build/perf/trace/beauty/perf-in.o
  LD       /tmp/build/perf/perf-in.o
  LINK     /tmp/build/perf/perf

This addresses this perf tools build warning:

  diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
  Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/arch/x86/include/asm/msr-index.h
tools/perf/trace/beauty/tracepoints/x86_msr.sh