All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Starting AMD SEV work
@ 2024-04-10 15:36   ` Andrei Semenov
  0 siblings, 0 replies; 18+ messages in thread
From: Andrei Semenov @ 2024-04-10 15:36 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrei Semenov, Jan Beulich, Andrew Cooper, Roger Pau Monné,
	George Dunlap, Julien Grall, Stefano Stabellini

This patch series initiate work on AMD SEV technology implementation in Xen.
SEV stands for "Secure Encrypted Virtualization" and allows the memory contents
of a VM to be encrypted with a key unique to this VM. In this way the neither
other VMs nor hypervisor can't read the memory content of this "encrypted"
VM.

In order to create and to run such a VM different layers of software must
interact (bascally Xen hypevisor, Xen toolstack in dom0 and the encrypted VM
itself).

In this work we start with discovering and enabling SEV feature on the platform.
The second patch ports AMD Secure Processor driver on Xen. This AMD Secure
Processor device (a.k.a PSP) is the way the different software layers interact
with AMD firmware/hardware to manage and run the encrypted VM.

Actually there's two modes of functionning of the ASP driver. The "polling" mode
and the "interrupt" mode. The interrupt mode raises some questions about how we
put the client thread to sleep (wait for interrupt). The actual way, based on
waitqueue, have two major inconvinients.

- compatibility with Intel Control-flow Enfocement (shadow stack)
- requests serialization (locking)

So, actually if CET is enabled on the platform all requests will be done by the
driver in "polling" mode. As with requests serialization, the "interrupt" mode
actually assumes the serialization is done by the driver client.

Obviously, I hope there wll be discussions with the community  on these 2
inconvienients to find out more efficient solutions.

Andrei Semenov (2):
  Implemented AMD SEV discovery and enabling.
  Implemented Amd Secure Processor device driver

 xen/arch/x86/cpu/amd.c                 |  53 ++
 xen/arch/x86/hvm/svm/Makefile          |   1 +
 xen/arch/x86/hvm/svm/sev.c             |   4 +
 xen/arch/x86/include/asm/cpufeature.h  |   3 +
 xen/arch/x86/include/asm/cpufeatures.h |   2 +
 xen/arch/x86/include/asm/msr-index.h   |   1 +
 xen/arch/x86/include/asm/psp-sev.h     | 655 ++++++++++++++++++++
 xen/arch/x86/include/asm/sev.h         |  11 +
 xen/drivers/Kconfig                    |   2 +
 xen/drivers/Makefile                   |   1 +
 xen/drivers/crypto/Kconfig             |  10 +
 xen/drivers/crypto/Makefile            |   1 +
 xen/drivers/crypto/asp.c               | 808 +++++++++++++++++++++++++
 xen/include/xen/types.h                |   2 +-
 14 files changed, 1553 insertions(+), 1 deletion(-)
 create mode 100644 xen/arch/x86/hvm/svm/sev.c
 create mode 100644 xen/arch/x86/include/asm/psp-sev.h
 create mode 100644 xen/arch/x86/include/asm/sev.h
 create mode 100644 xen/drivers/crypto/Kconfig
 create mode 100644 xen/drivers/crypto/Makefile
 create mode 100644 xen/drivers/crypto/asp.c

-- 
2.35.3



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

end of thread, other threads:[~2024-04-18 13:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10 15:36 [PATCH v1 0/2] Starting AMD SEV work Andrei Semenov
2024-04-10 15:36 ` Andrei Semenov
2024-04-10 15:36   ` [PATCH v1 0/2] AMD SEV initial work Andrei Semenov
2024-04-10 15:36   ` [PATCH v1 1/2] Implemented AMD SEV discovery and enabling Andrei Semenov
2024-04-11 18:32     ` Andrew Cooper
2024-04-12 14:06       ` Andrei Semenov
2024-04-12 14:38         ` Vaishali Thakkar
2024-04-12 15:07           ` Andrew Cooper
2024-04-12 15:18             ` Vaishali Thakkar
2024-04-18  8:13     ` Jan Beulich
2024-04-18 13:29       ` Andrei Semenov
2024-04-10 15:36   ` [PATCH v1 2/2] Implemented Amd Secure Processor device driver Andrei Semenov
2024-04-11 18:42     ` Andrew Cooper
2024-04-12 14:49       ` Andrei Semenov
2024-04-12 14:56         ` Andrew Cooper
2024-04-18  8:31     ` Jan Beulich
2024-04-10 16:31   ` [PATCH v1 0/2] AMD SEV initial work Andrei Semenov
2024-04-11  0:50   ` [PATCH v1 0/2] Starting AMD SEV work Marek Marczykowski-Górecki
2024-04-11  7:48     ` Andrei Semenov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.