linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/8] Support ACPI PSP on Hyper-V
@ 2023-03-20 19:19 Jeremi Piotrowski
  2023-03-20 19:19 ` [PATCH v3 1/8] include/acpi: add definition of ASPT table Jeremi Piotrowski
                   ` (8 more replies)
  0 siblings, 9 replies; 34+ messages in thread
From: Jeremi Piotrowski @ 2023-03-20 19:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Jeremi Piotrowski, Brijesh Singh, Tom Lendacky, Kalra, Ashish,
	linux-crypto, Rafael J. Wysocki, Len Brown, linux-acpi,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86

This patch series introduces support for discovering AMD's PSP from an ACPI
table and extends the CCP driver to allow binding to that device on x86. This
method of PSP discovery is used on Hyper-V when SNP isolation support is
exposed to the guest. There is no ACPI node associated with this PSP, so after
parsing the ASPT it is registered with the system as a platform_device.

I thought about putting psp.c in arch/x86/coco, but that directory is meant for
the (confidential) guest side of CoCo, not the supporting host side code.
It was kept in arch/x86/kernel because configuring the irq for the PSP through
the ACPI interface requires poking at bits from the architectural vector
domain.

This series is a prerequisite for nested SNP-host support on Hyper-V but is
independent of the SNP-host support patch set. Hyper-V only supports nested
SEV-SNP (not SEV or SEV-ES) so the PSP only supports a subset of the full PSP
command set. Without SNP-host support (which is not upstream yet), the only
PSP command that will succeed is SEV_PLATFORM_STATUS.

Changes since v2:
* Added links to ASPT spec and ACPICA commit
* Added acked-by Tom to all commits
Changes since v1:
* move platform_device_add_data() call to commit that introduces psp device
* change psp dependency from CONFIG_AMD_MEM_ENCRYPT to CONFIG_KVM_AMD_SEV
* add blank lines, s/plat/platform/, remove variable initializers before first
  use, remove masking/shifting where not needed
* dynamically allocate sev_vdata/psp_vdata structs instead of overwriting static
  variables

Jeremi Piotrowski (8):
  include/acpi: add definition of ASPT table
  ACPI: ASPT: Add helper to parse table
  x86/psp: Register PSP platform device when ASP table is present
  x86/psp: Add IRQ support
  crypto: cpp - Bind to psp platform device on x86
  crypto: ccp - Add vdata for platform device
  crypto: ccp - Skip DMA coherency check for platform psp
  crypto: ccp - Allow platform device to be psp master device

 arch/x86/kernel/Makefile          |   1 +
 arch/x86/kernel/psp.c             | 219 ++++++++++++++++++++++++++++++
 drivers/acpi/Makefile             |   1 +
 drivers/acpi/aspt.c               | 104 ++++++++++++++
 drivers/crypto/ccp/sp-dev.c       |  65 +++++++++
 drivers/crypto/ccp/sp-dev.h       |   4 +
 drivers/crypto/ccp/sp-pci.c       |  48 -------
 drivers/crypto/ccp/sp-platform.c  |  76 ++++++++++-
 include/acpi/actbl1.h             |  46 +++++++
 include/linux/platform_data/psp.h |  32 +++++
 10 files changed, 547 insertions(+), 49 deletions(-)
 create mode 100644 arch/x86/kernel/psp.c
 create mode 100644 drivers/acpi/aspt.c
 create mode 100644 include/linux/platform_data/psp.h

-- 
2.34.1


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2023-04-13 21:54 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 19:19 [PATCH v3 0/8] Support ACPI PSP on Hyper-V Jeremi Piotrowski
2023-03-20 19:19 ` [PATCH v3 1/8] include/acpi: add definition of ASPT table Jeremi Piotrowski
2023-03-20 19:19 ` [PATCH v3 2/8] ACPI: ASPT: Add helper to parse table Jeremi Piotrowski
2023-03-20 19:19 ` [PATCH v3 3/8] x86/psp: Register PSP platform device when ASP table is present Jeremi Piotrowski
2023-03-20 19:25   ` Borislav Petkov
2023-03-20 19:37     ` Jeremi Piotrowski
2023-03-20 20:03       ` Borislav Petkov
2023-03-20 20:18         ` Jeremi Piotrowski
2023-03-20 21:03           ` Borislav Petkov
2023-03-21 14:15             ` Jeremi Piotrowski
2023-03-20 19:19 ` [PATCH v3 4/8] x86/psp: Add IRQ support Jeremi Piotrowski
2023-03-21 10:31   ` Thomas Gleixner
2023-03-21 19:16     ` Jeremi Piotrowski
2023-03-22 10:07       ` Thomas Gleixner
2023-03-28 18:29         ` Jeremi Piotrowski
2023-03-20 19:19 ` [PATCH v3 5/8] crypto: cpp - Bind to psp platform device on x86 Jeremi Piotrowski
2023-03-20 19:19 ` [PATCH v3 6/8] crypto: ccp - Add vdata for platform device Jeremi Piotrowski
2023-03-20 19:19 ` [PATCH v3 7/8] crypto: ccp - Skip DMA coherency check for platform psp Jeremi Piotrowski
2023-03-20 19:19 ` [PATCH v3 8/8] crypto: ccp - Allow platform device to be psp master device Jeremi Piotrowski
2023-03-22 15:46 ` [PATCH v3 0/8] Support ACPI PSP on Hyper-V Borislav Petkov
2023-03-22 17:33   ` Jeremi Piotrowski
2023-03-22 18:15     ` Borislav Petkov
2023-03-23 14:46       ` Jeremi Piotrowski
2023-03-23 15:23         ` Borislav Petkov
2023-03-23 16:11           ` Jeremi Piotrowski
2023-03-23 16:34             ` Borislav Petkov
2023-03-24 17:10               ` Jeremi Piotrowski
2023-04-02 15:44                 ` Borislav Petkov
2023-04-03  6:20                   ` Thomas Gleixner
2023-04-05  7:56                     ` Jeremi Piotrowski
2023-04-11 15:10                       ` Jeremi Piotrowski
2023-04-13 21:53                       ` Thomas Gleixner
2023-04-05  8:10                     ` Jeremi Piotrowski
2023-04-05  8:50                   ` Jeremi Piotrowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).