Intel Software Defined Silicon
Subsystems (4)
David E. Box
maintainercover Intel Software Defined Silicon
This series adds support for Intel Software Defined Silicon. These patches are the same as patches 4-6 from this series [1]. Patches 1-3 of that series were pulled in during the 5.17 merge window.
David E. Box (3):
platform/x86: Add Intel Software Defined Silicon driver tools arch x86: Add Intel SDSi provisioning tool
selftests: sdsi: test sysfs setup
[1] https://lore.kernel.org/lkml/[email protected]/T/
.../ABI/testing/sysfs-driver-intel_sdsi | 77 +++ MAINTAINERS | 7 + drivers/platform/x86/intel/Kconfig | 12 + drivers/platform/x86/intel/Makefile | 2 + drivers/platform/x86/intel/sdsi.c | 571 ++++++++++++++++++ drivers/platform/x86/intel/vsec.c | 12 +- tools/arch/x86/intel_sdsi/Makefile | 9 + tools/arch/x86/intel_sdsi/sdsi.c | 540 +++++++++++++++++ tools/testing/selftests/drivers/sdsi/sdsi.sh | 18 + .../selftests/drivers/sdsi/sdsi_test.py | 226 +++++++ 10 files changed, 1473 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/sysfs-driver-intel_sdsi create mode 100644 drivers/platform/x86/intel/sdsi.c create mode 100644 tools/arch/x86/intel_sdsi/Makefile create mode 100644 tools/arch/x86/intel_sdsi/sdsi.c create mode 100755 tools/testing/selftests/drivers/sdsi/sdsi.sh create mode 100644 tools/testing/selftests/drivers/sdsi/sdsi_test.py
Signature · 1 line
2.25.1
David E. Box
maintainerPATCH 1/3 platform/x86: Add Intel Software Defined Silicon driver
Intel Software Defined Silicon (SDSi) is a post manufacturing mechanism for activating additional silicon features. Features are enabled through a license activation process. The SDSi driver provides a per socket, sysfs attribute interface for applications to perform 3 main provisioning functions:
1. Provision an Authentication Key Certificate (AKC), a key written to internal NVRAM that is used to authenticate a capability specific activation payload.
2. Provision a Capability Activation Payload (CAP), a token authenticated using the AKC and applied to the CPU configuration to activate a new feature.
3. Read the SDSi State Certificate, containing the CPU configuration state.
The operations perform function specific mailbox commands that forward the requests to SDSi hardware to perform authentication of the payloads and enable the silicon configuration (to be made available after power cycling).
The SDSi device itself is enumerated as an auxiliary device from the intel_vsec driver and as such has a build dependency on CONFIG_INTEL_VSEC.
--- .../ABI/testing/sysfs-driver-intel_sdsi | 77 +++ MAINTAINERS | 5 + drivers/platform/x86/intel/Kconfig | 12 + drivers/platform/x86/intel/Makefile | 2 + drivers/platform/x86/intel/sdsi.c | 571 ++++++++++++++++++ drivers/platform/x86/intel/vsec.c | 12 +- 6 files changed, 678 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/sysfs-driver-intel_sdsi create mode 100644 drivers/platform/x86/intel/sdsi.c
Documentation/ABI/testing/sysfs-driver-intel_sdsi new file +77 -0
@@ -0,0 +1,77 @@ +What: /sys/bus/auxiliary/devices/intel_vsec.sdsi.X +Date: Dec 2021 +KernelVersion: 5.17 +Contact: "David E. Box" <[email protected]> +Description: + This directory contains interface files for accessing Intel + Software Defined Silicon (SDSi) features on a CPU. X + represents the socket instance (though not the socket ID). + The socket ID is determined by reading the registers file + and decoding it per the specification. + + Some files communicate with SDSi hardware through a mailbox. + Should the operation fail, one of the following error codes + may be returned: + + Error Code Cause + ---------- ----- + EIO General mailbox failure. Log may indicate cause. + EBUSY Mailbox is owned by another agent. + EPERM SDSI capability is not enabled in hardware. + EPROTO Failure in mailbox protocol detected by driver. + See log for details. + EOVERFLOW For provision commands, the size of the data + exceeds what may be written. + ESPIPE Seeking is not allowed. + ETIMEDOUT Failure to complete mailbox transaction in time. + +What: /sys/bus/auxiliary/devices/intel_vsec.sdsi.X/guid +Date: Dec 2021 +KernelVersion: 5.17 +Contact: "David E. Box" <[email protected]> +Description: + (RO) The GUID for the registers file. The GUID identifies + the layout of the registers file in this directory. + Information about the register layouts for a particular GUID + is available at http://github.com/intel/intel-sdsi + +What: /sys/bus/auxiliary/devices/intel_vsec.sdsi.X/registers +Date: Dec 2021 +KernelVersion: 5.17 +Contact: "David E. Box" <[email protected]> +Description: + (RO) Contains information needed by applications to provision + a CPU and monitor status information. The layout of this file + is determined by the GUID in this directory. Information about + the layout for a particular GUID is available at + http://github.com/intel/intel-sdsi + +What: /sys/bus/auxiliary/devices/intel_vsec.sdsi.X/provision_akc +Date: Dec 2021 +KernelVersion: 5.17 +Contact: "David E. Box" <[email protected]> +Description: + (WO) Used to write an Authentication Key Certificate (AKC) to + the SDSi NVRAM for the CPU. The AKC is used to authenticate a + Capability Activation Payload. Mailbox command. + +What: /sys/bus/auxiliary/devices/intel_vsec.sdsi.X/provision_cap +Date: Dec 2021 +KernelVersion: 5.17 +Contact: "David E. Box" <[email protected]> +Description: + (WO) Used to write a Capability Activation Payload (CAP) to the + SDSi NVRAM for the CPU. CAPs are used to activate a given CPU + feature. A CAP is validated by SDSi hardware using a previously + provisioned AKC file. Upon successful authentication, the CPU + configuration is updated. A cold reboot is required to fully + activate the feature. Mailbox command. + +What: /sys/bus/auxiliary/devices/intel_vsec.sdsi.X/state_certificate +Date: Dec 2021 +KernelVersion: 5.17 +Contact: "David E. Box" <[email protected]> +Description: + (RO) Used to read back the current State Certificate for the CPU + from SDSi hardware. The State Certificate contains information + about the current licenses on the CPU. Mailbox command.
MAINTAINERS +5 -0
@@ -9870,6 +9870,11 @@ S: Maintained F: arch/x86/include/asm/intel_scu_ipc.h F: drivers/platform/x86/intel_scu_* +INTEL SDSI DRIVER +M: David E. Box <[email protected]> +S: Supported +F: drivers/platform/x86/intel/sdsi.c + INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER M: Daniel Scally <[email protected]> S: Maintained
drivers/platform/x86/intel/Kconfig +12 -0
@@ -134,6 +134,18 @@ config INTEL_RST firmware will copy the memory contents back to RAM and resume the OS as usual. +config INTEL_SDSI + tristate "Intel Software Defined Silicon Driver" + depends on INTEL_VSEC + depends on X86_64 + help + This driver enables access to the Intel Software Defined Silicon + interface used to provision silicon features with an authentication + certificate and capability license. + + To compile this driver as a module, choose M here: the module will + be called intel_sdsi. + config INTEL_SMARTCONNECT tristate "Intel Smart Connect disabling driver" depends on ACPI
drivers/platform/x86/intel/Makefile +2 -0
@@ -26,6 +26,8 @@ intel_int0002_vgpio-y := int0002_vgpio.o obj-$(CONFIG_INTEL_INT0002_VGPIO) += intel_int0002_vgpio.o intel_oaktrail-y := oaktrail.o obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o +intel_sdsi-y := sdsi.o +obj-$(CONFIG_INTEL_SDSI) += intel_sdsi.o intel_vsec-y := vsec.o obj-$(CONFIG_INTEL_VSEC) += intel_vsec.o
drivers/platform/x86/intel/sdsi.c new file +571 -0
571 lines not on this page · raw message
drivers/platform/x86/intel/vsec.c +11 -1
@@ -32,6 +32,7 @@#define TABLE_OFFSET_SHIFT 3static DEFINE_IDA (intel_vsec_ida); +static DEFINE_IDA (intel_vsec_sdsi_ida);/** * struct intel_vsec_header - Common fields of Intel VSEC and DVSEC registers.
@@ -63,12 +64,14 @@ enum intel_vsec_id {VSEC_ID_TELEMETRY =2 ,VSEC_ID_WATCHER =3 ,VSEC_ID_CRASHLOG =4 , + VSEC_ID_SDSI = 65, };static enum intel_vsec_id intel_vsec_allow_list[] = {VSEC_ID_TELEMETRY ,VSEC_ID_WATCHER ,VSEC_ID_CRASHLOG , +VSEC_ID_SDSI , };static const char *intel_vsec_name (enum intel_vsec_id id)
@@ -83,6 +86,9 @@ static const char *intel_vsec_name(enum intel_vsec_id id)case VSEC_ID_CRASHLOG :return "crashlog" ; +case VSEC_ID_SDSI : +return "sdsi" ; +default :return NULL ; }
@@ -211,7 +217,11 @@ static int intel_vsec_add_dev(struct pci_dev *pdev, struct intel_vsec_header *he intel_vsec_dev->resource = res; intel_vsec_dev->num_resources = header->num_entries; intel_vsec_dev->quirks = quirks; - intel_vsec_dev->ida = &intel_vsec_ida; + +if (header->id ==VSEC_ID_SDSI ) + intel_vsec_dev->ida = &intel_vsec_sdsi_ida; +else + intel_vsec_dev->ida = &intel_vsec_ida;return intel_vsec_add_aux (pdev, intel_vsec_dev,intel_vsec_name (header->id)); }
Signature · 1 line
2.25.1
Re: [PATCH 1/3] platform/x86: Add Intel Software Defined Silicon driver
Quoted 45 lines · David E. Box
Intel Software Defined Silicon (SDSi) is a post manufacturing mechanism for activating additional silicon features. Features are enabled through a license activation process. The SDSi driver provides a per socket, sysfs attribute interface for applications to perform 3 main provisioning functions:
1. Provision an Authentication Key Certificate (AKC), a key written to internal NVRAM that is used to authenticate a capability specific activation payload.
2. Provision a Capability Activation Payload (CAP), a token authenticated using the AKC and applied to the CPU configuration to activate a new feature.
3. Read the SDSi State Certificate, containing the CPU configuration state.
The operations perform function specific mailbox commands that forward the requests to SDSi hardware to perform authentication of the payloads and enable the silicon configuration (to be made available after power cycling).
The SDSi device itself is enumerated as an auxiliary device from the
intel_vsecdriver and as such has a build dependency onCONFIG_INTEL_VSEC.Signed-off-by David E. Box <[email protected]>Reviewed-by Mark Gross <[email protected]>--- .../ABI/testing/sysfs-driver-intel_sdsi | 77 +++ MAINTAINERS | 5 + drivers/platform/x86/intel/Kconfig | 12 + drivers/platform/x86/intel/Makefile | 2 + drivers/platform/x86/intel/sdsi.c | 571 ++++++++++++++++++ drivers/platform/x86/intel/vsec.c | 12 +- 6 files changed, 678 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/sysfs-driver-intel_sdsi create mode 100644 drivers/platform/x86/intel/sdsi.cDocumentation/ABI/testing/sysfs-driver-intel_sdsi new file +0
-0
Documentation/ABI/testing/sysfs-driver-intel_sdsi line 3
Quoted 3 lines
Documentation/ABI/testing/sysfs-driver-intel_sdsi new file +3
-0@@ -0,0 +1,77 @@ +What: /sys/bus/auxiliary/devices/intel_vsec.sdsi.X +Date: Dec 2021 +KernelVersion: 5.17
5.17 merge window is long gone now.
Please be more careful.
David E. Box
maintainerRe: [PATCH 1/3] platform/x86: Add Intel Software Defined Silicon driver
Quoted 53 lines · Greg KH
Quoted 46 lines · David E. Box
Intel Software Defined Silicon (SDSi) is a post manufacturing mechanism for activating additional silicon features. Features are enabled through a license activation process. The SDSi driver provides a per socket, sysfs attribute interface for applications to perform 3 main provisioning functions:
1. Provision an Authentication Key Certificate (AKC), a key written to internal NVRAM that is used to authenticate a capability specific activation payload.
2. Provision a Capability Activation Payload (CAP), a token authenticated using the AKC and applied to the CPU configuration to activate a new feature.
3. Read the SDSi State Certificate, containing the CPU configuration state.
The operations perform function specific mailbox commands that forward the requests to SDSi hardware to perform authentication of the payloads and enable the silicon configuration (to be made available after power cycling).
The SDSi device itself is enumerated as an auxiliary device from the
intel_vsecdriver and as such has a build dependency onCONFIG_INTEL_VSEC.Signed-off-by David E. Box <[email protected]>Reviewed-by Mark Gross <[email protected]>--- .../ABI/testing/sysfs-driver-intel_sdsi | 77 +++ MAINTAINERS | 5 + drivers/platform/x86/intel/Kconfig | 12 + drivers/platform/x86/intel/Makefile | 2 + drivers/platform/x86/intel/sdsi.c | 571 ++++++++++++++++++ drivers/platform/x86/intel/vsec.c | 12 +- 6 files changed, 678 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/sysfs-driver-intel_sdsi create mode 100644 drivers/platform/x86/intel/sdsi.cDocumentation/ABI/testing/sysfs-driver-intel_sdsi new file +0
-0Documentation/ABI/testing/sysfs-driver-intel_sdsi line 3
Quoted 3 lines
Documentation/ABI/testing/sysfs-driver-intel_sdsi new file +3
-0@@ -0,0 +1,77 @@ +What: /sys/bus/auxiliary/devices/intel_vsec.sdsi.X +Date: Dec 2021 +KernelVersion: 5.175.17 merge window is long gone now.
Quoted 2 lines
Please be more careful.
Thanks.
Re: [PATCH 1/3] platform/x86: Add Intel Software Defined Silicon driver
In reply to David E. BoxQuoted 1 line · David E. Box
+ * Copyright (c) 2021, Intel Corporation.
You did not touch it this year?
Re: [PATCH 1/3] platform/x86: Add Intel Software Defined Silicon driver
In reply to David E. BoxQuoted 2 lines · David E. Box
drivers/platform/x86/intel/sdsi.c new file +2
-0+static struct bin_attribute bin_attr_provision_akc; +static struct bin_attribute bin_attr_provision_cap;
<snip>
Quoted 1 line
+static
BIN_ATTR_WO(provision_akc, SDSI_SIZE_WRITE_MSG);
You the structure twice, why?
David E. Box
maintainerRe: [PATCH 1/3] platform/x86: Add Intel Software Defined Silicon driver
Quoted 9 lines · Greg KH
Quoted 2 lines · David E. Box
drivers/platform/x86/intel/sdsi.c new file +2
-0+static struct bin_attribute bin_attr_provision_akc; +static struct bin_attribute bin_attr_provision_cap;<snip>
Quoted 1 line
+static
BIN_ATTR_WO(provision_akc, SDSI_SIZE_WRITE_MSG);You the structure twice, why?
Will drop. There's no longer a reference to these attributes before they're defined.
David
Quoted 1 line
David E. Box
maintainerPATCH 2/3 tools arch x86: Add Intel SDSi provisioning tool
In reply to David E. BoxAdd tool for key certificate and activation payload provisioning on Intel CPUs supporting Software Defined Silicon (SDSi).
--- MAINTAINERS | 1 + tools/arch/x86/intel_sdsi/Makefile | 9 + tools/arch/x86/intel_sdsi/sdsi.c | 540 +++++++++++++++++++++++++++++ 3 files changed, 550 insertions(+) create mode 100644 tools/arch/x86/intel_sdsi/Makefile create mode 100644 tools/arch/x86/intel_sdsi/sdsi.c
MAINTAINERS +1 -0
@@ -9874,6 +9874,7 @@ INTEL SDSI DRIVER M: David E. Box <[email protected]> S: Supported F: drivers/platform/x86/intel/sdsi.c +F: tools/arch/x86/intel_sdsi/ INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER M: Daniel Scally <[email protected]>
tools/arch/x86/intel_sdsi/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 + +.PHONY: sdsi + +sdsi: sdsi.o + $(CC) -Wall $^ -o $@ + +clean: + rm *.o sdsi
tools/arch/x86/intel_sdsi/sdsi.c new file +540 -0
540 lines not on this page · raw message
Signature · 1 line
2.25.1
David E. Box
maintainerPATCH 3/3 selftests: sdsi: test sysfs setup
In reply to David E. BoxTests file configuration and error handling of the Intel Software Defined Silicon sysfs ABI.
--- MAINTAINERS | 1 + tools/testing/selftests/drivers/sdsi/sdsi.sh | 18 ++ .../selftests/drivers/sdsi/sdsi_test.py | 226 ++++++++++++++++++ 3 files changed, 245 insertions(+) create mode 100755 tools/testing/selftests/drivers/sdsi/sdsi.sh create mode 100644 tools/testing/selftests/drivers/sdsi/sdsi_test.py
MAINTAINERS +1 -0
@@ -9875,6 +9875,7 @@ M: David E. Box <[email protected]> S: Supported F: drivers/platform/x86/intel/sdsi.c F: tools/arch/x86/intel_sdsi/ +F: tools/testing/selftests/drivers/sdsi/ INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER M: Daniel Scally <[email protected]>
tools/testing/selftests/drivers/sdsi/sdsi.sh new file +18 -0
@@ -0,0 +1,18 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Runs tests for the intel_sdsi driver + +if ! /sbin/modprobe -q -r intel_sdsi; then + echo "drivers/sdsi: [SKIP]" + exit 77 +fi + +if /sbin/modprobe -q intel_sdsi; then + python3 -m pytest sdsi_test.py + /sbin/modprobe -q -r intel_sdsi + + echo "drivers/sdsi: ok" +else + echo "drivers/sdsi: [FAIL]" + exit 1 +fi
tools/testing/selftests/drivers/sdsi/sdsi_test.py new file +226 -0
226 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 20 lines · David E. Box
This series adds support for Intel Software Defined Silicon. These patches are the same as patches 4-6 from this series [1]. Patches 1-3 of that series were pulled in during the 5.17 merge window.
David E. Box (3):
platform/x86: Add Intel Software Defined Silicon driver tools arch x86: Add Intel SDSi provisioning tool
selftests: sdsi: test sysfs setup[1] https://lore.kernel.org/lkml/[email protected]/T/
.../ABI/testing/sysfs-driver-intel_sdsi | 77 +++ MAINTAINERS | 7 + drivers/platform/x86/intel/Kconfig | 12 + drivers/platform/x86/intel/Makefile | 2 + drivers/platform/x86/intel/sdsi.c | 571 ++++++++++++++++++ drivers/platform/x86/intel/vsec.c | 12 +- tools/arch/x86/intel_sdsi/Makefile | 9 + tools/arch/x86/intel_sdsi/sdsi.c | 540 +++++++++++++++++ tools/testing/selftests/drivers/sdsi/sdsi.sh | 18 +
Quoted 12 lines
.../selftests/drivers/sdsi/sdsi_test.py | 226 +++++++ 10 files changed, 1473 insertions(+), 1 deletion(-) create mode 100644 Documentation/ABI/testing/sysfs-driver-intel_sdsi create mode 100644 drivers/platform/x86/intel/sdsi.c create mode 100644 tools/arch/x86/intel_sdsi/Makefile create mode 100644 tools/arch/x86/intel_sdsi/sdsi.c create mode 100755 tools/testing/selftests/drivers/sdsi/sdsi.sh create mode 100644 tools/testing/selftests/drivers/sdsi/sdsi_test.pySignature · 1 line
2.25.1
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- This looks like a new version of a previously submitted patch, but you did not list below the --- line any changes from the previous version. Please read the section entitled "The canonical patch format" in the kernel file, Documentation/SubmittingPatches for what needs to be done here to properly describe this.
If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot