[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220422200219.2843823-1-tony.luck@intel.com>
Date: Fri, 22 Apr 2022 13:02:09 -0700
From: Tony Luck <tony.luck@...el.com>
To: hdegoede@...hat.com, markgross@...nel.org
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
corbet@....net, gregkh@...uxfoundation.org,
andriy.shevchenko@...ux.intel.com, jithu.joseph@...el.com,
ashok.raj@...el.com, tony.luck@...el.com, rostedt@...dmis.org,
dan.j.williams@...el.com, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, platform-driver-x86@...r.kernel.org,
patches@...ts.linux.dev, ravi.v.shankar@...el.com
Subject: [PATCH v4 00/10] Introduce In Field Scan driver
TL;DR this driver loads scan test files that can check whether silicon
in a CPU core is still running correctly. It is expected that these tests
would be run several times per day to catch problems as silicon ages.
Changes since v3:
Thomas Gleixner:
----------------
1) intel_collect_cpu_info_early() ... function name doesn't make sense
in context of this driver
True: Dropped the "_early" suffix from the name.
Greg Kroah-Hartman:
-------------------
1) "Ick, why?" and "pmem.c should not be used as a good example of anything"
and "Why not just use a misc device?"
Now using a misc device.
2) "So even if everything fails, you succeed?"
This was w.r.t. the "pmem"-like driver, which is completely gone in
v4. New driver succeeds if any of the test-types enumerate as present
on the system. Fails with -ENODEV if no test types found.
3) "sysfs documentation belongs in Documentation/ABI/"
See patch 10 of this series.
4) "And why not just include this whole thing in the driver itself and suck
the documentation out of that? No need to have a separate file."
Dropped Documentation/x86/ifs.rst from v4. People should be able to
figure out how to use it from the ABI docs for the sysfs files. If
that turns out to be wrong, we can revisit.
5) "int load_ifs_binary(struct device *dev)
Shouldn't all of your global symbols start with "ifs_"? Your other ones
seem to, what went wrong here?
Also, how about "ifs_load_firmware()" makes more sense."
Changed name to ifs_load_firmware()
6) "static bool ifs_image_sanity_check(struct device *dev, void *data)
u8 *data?" and
"if (!ifs_image_sanity_check(dev, (void *)fw->data)) {
It's not a void pointer, it's a pointer to u8. Why cast it away?"
Changed the top of that call stack to cast to "(struct microcode_header_intel *)
which is what the lower level functions all want.
7) "if (!sysfs_streq(buf, "1"))
kstrtobool()?
Changed from sysfs_streq() to kstrtobool()
8) "ATTRIBUTE_GROUPS()?"
Now using this macro.
Steven Rostedt:
---------------
1) "TP_PROTO(union ifs_scan activate, union ifs_status status),
Really, you want to pass the structure in by value, so that we have two
copies? One to get to this function and then one to write to the ring
buffer?"
Discussion on list resolved because these "pass by value" objects are
just wrappers around a u64. Passing pointers wouldn't make any real
difference. No code change.
Jithu Joseph (7):
x86/microcode/intel: Expose collect_cpu_info_early() for IFS
platform/x86/intel/ifs: Read IFS firmware image
platform/x86/intel/ifs: Check IFS Image sanity
platform/x86/intel/ifs: Authenticate and copy to secured memory
platform/x86/intel/ifs: Add scan test support
platform/x86/intel/ifs: Add IFS sysfs interface
platform/x86/intel/ifs: add ABI documentation for IFS
Tony Luck (3):
x86/msr-index: Define INTEGRITY_CAPABILITIES MSR
platform/x86/intel/ifs: Add stub driver for In-Field Scan
trace: platform/x86/intel/ifs: Add trace point to track Intel IFS
operations
.../ABI/testing/sysfs-platform-intel-ifs | 39 ++
MAINTAINERS | 8 +
arch/x86/include/asm/cpu.h | 18 +
arch/x86/include/asm/msr-index.h | 7 +
arch/x86/kernel/cpu/intel.c | 32 ++
arch/x86/kernel/cpu/microcode/intel.c | 59 +---
drivers/platform/x86/intel/Kconfig | 1 +
drivers/platform/x86/intel/Makefile | 1 +
drivers/platform/x86/intel/ifs/Kconfig | 13 +
drivers/platform/x86/intel/ifs/Makefile | 3 +
drivers/platform/x86/intel/ifs/core.c | 97 +++++
drivers/platform/x86/intel/ifs/ifs.h | 123 +++++++
drivers/platform/x86/intel/ifs/load.c | 262 ++++++++++++++
drivers/platform/x86/intel/ifs/runtest.c | 332 ++++++++++++++++++
drivers/platform/x86/intel/ifs/sysfs.c | 147 ++++++++
include/trace/events/intel_ifs.h | 38 ++
16 files changed, 1128 insertions(+), 52 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-platform-intel-ifs
create mode 100644 drivers/platform/x86/intel/ifs/Kconfig
create mode 100644 drivers/platform/x86/intel/ifs/Makefile
create mode 100644 drivers/platform/x86/intel/ifs/core.c
create mode 100644 drivers/platform/x86/intel/ifs/ifs.h
create mode 100644 drivers/platform/x86/intel/ifs/load.c
create mode 100644 drivers/platform/x86/intel/ifs/runtest.c
create mode 100644 drivers/platform/x86/intel/ifs/sysfs.c
create mode 100644 include/trace/events/intel_ifs.h
base-commit: b2d229d4ddb17db541098b83524d901257e93845
--
2.35.1
Powered by blists - more mailing lists