All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v2 00/12] Add AMD Secure Nested Paging (SEV-SNP) support
@ 2021-08-26 22:26 Michael Roth
  2021-08-26 22:26 ` [RFC PATCH v2 01/12] i386/sev: introduce "sev-common" type to encapsulate common SEV state Michael Roth
                   ` (12 more replies)
  0 siblings, 13 replies; 61+ messages in thread
From: Michael Roth @ 2021-08-26 22:26 UTC (permalink / raw)
  To: qemu-devel
  Cc: Connor Kuehl, Philippe Mathieu-Daudé,
	Michael S . Tsirkin, James Bottomley, Dr . David Alan Gilbert,
	Tom Lendacky, Paolo Bonzini, Dov Murik, David Gibson,
	Daniel P . Berrangé,
	kvm, Eduardo Habkost, Brijesh Singh, Markus Armbruster,
	Eric Blake

These patches implement SEV-SNP along with CPUID enforcement support for QEMU,
and are also available at:

  https://github.com/mdroth/qemu/commits/snp-rfc-v2-upstream

They are based on the initial RFC submitted by Brijesh:

  https://lore.kernel.org/qemu-devel/20210722000259.ykepl7t6ptua7im5@amd.com/T/

Changes since RFC v1:

 - rebased onto latest master
 - drop SNP config file in favor of a new 'sev-snp-guest' object where all
   SNP-related params are passed as strings/integers via command-line
 - report specific error if BIOS reports invalid address/len for
   reserved/pre-validated regions (Connor)
 - use Range helpers for handling validated region overlaps (Dave)
 - simplify error handling in sev_snp_launch_start, and report the correct
   return code when handling LAUNCH_START failures (Dov)
 - add SEV-SNP bit to CPUID 0x8000001f when SNP enabled
 - updated query-sev to handle differences between SEV and SEV-SNP
 - updated to work against v5 of SEV-SNP host kernel / hypervisor patches

Overview
--------

SEV-SNP builds upon existing SEV and SEV-ES functionality while adding
new hardware-based memory protections. SEV-SNP adds strong memory integrity
protection to help prevent malicious hypervisor-based attacks like data
replay, memory re-mapping and more in order to create an isolated memory
encryption environment.

This series depends on the following patches to support SEV-SNP in Linux
kernel and OVMF:

  guest kernel (v5, part 1):
  https://lore.kernel.org/kvm/20210820151933.22401-1-brijesh.singh@amd.com/T/
  
  host kernel (v5, part 2):
  https://lore.kernel.org/lkml/20210820155918.7518-1-brijesh.singh@amd.com/
  
  OVMF (v5):
  https://edk2.groups.io/g/devel/message/77335?p=,,,20,0,0,0::Created,,posterid%3A5969970,20,2,20,83891508

The Qemu patches uses the command id added by the SEV-SNP hypervisor
patches to bootstrap the SEV-SNP VMs.

Additional resources
--------------------
SEV-SNP whitepaper
https://www.amd.com/system/files/TechDocs/SEV-SNP-strengthening-vm-isolation-with-integrity-protection-and-more.pdf

APM 2: https://www.amd.com/system/files/TechDocs/24593.pdf (section 15.36)

GHCB spec:
https://developer.amd.com/wp-content/resources/56421.pdf

SEV-SNP firmware specification:
https://www.amd.com/system/files/TechDocs/56860.pdf

----------------------------------------------------------------
Brijesh Singh (6):
      linux-header: add the SNP specific command
      i386/sev: introduce 'sev-snp-guest' object
      i386/sev: initialize SNP context
      i386/sev: add the SNP launch start context
      i386/sev: add support to encrypt BIOS when SEV-SNP is enabled
      i386/sev: populate secrets and cpuid page and finalize the SNP launch

Michael Roth (6):
      i386/sev: introduce "sev-common" type to encapsulate common SEV state
      target/i386: set SEV-SNP CPUID bit when SNP enabled
      target/i386: allow versioned CPUs to specify new cache_info
      target/i386: add new EPYC CPU versions with updated cache_info
      i386/sev: sev-snp: add support for CPUID validation
      i386/sev: update query-sev QAPI format to handle SEV-SNP

 docs/amd-memory-encryption.txt |  77 +++-
 hw/i386/pc_sysfw.c             |   7 +-
 include/sysemu/sev.h           |   2 +-
 linux-headers/linux/kvm.h      |  50 +++
 qapi/misc-target.json          |  71 ++-
 qapi/qom.json                  |  94 +++-
 target/i386/cpu.c              | 221 ++++++++-
 target/i386/monitor.c          |  29 +-
 target/i386/sev-stub.c         |   8 +-
 target/i386/sev.c              | 989 +++++++++++++++++++++++++++++++++++------
 target/i386/sev_i386.h         |   4 +
 target/i386/trace-events       |   4 +
 12 files changed, 1374 insertions(+), 182 deletions(-)



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

end of thread, other threads:[~2021-11-16 11:54 UTC | newest]

Thread overview: 61+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 22:26 [RFC PATCH v2 00/12] Add AMD Secure Nested Paging (SEV-SNP) support Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 01/12] i386/sev: introduce "sev-common" type to encapsulate common SEV state Michael Roth
2021-09-01 14:18   ` Markus Armbruster
2021-09-03 15:11     ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 02/12] linux-header: add the SNP specific command Michael Roth
2021-09-03 20:36   ` Dov Murik
2021-09-03 20:36     ` Dov Murik
2021-09-07 14:27     ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 03/12] i386/sev: introduce 'sev-snp-guest' object Michael Roth
2021-09-01 14:29   ` Markus Armbruster
2021-09-03 15:15     ` Michael Roth
2021-09-03 21:12   ` Dov Murik
2021-09-03 21:12     ` Dov Murik
2021-09-07 14:20     ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 04/12] i386/sev: initialize SNP context Michael Roth
2021-09-05  7:07   ` Dov Murik
2021-09-05  7:07     ` Dov Murik
2021-09-05 13:58     ` Brijesh Singh
2021-09-05 17:09       ` Dov Murik
2021-09-05 17:09         ` Dov Murik
2021-09-05  9:19   ` Dov Murik
2021-09-05  9:19     ` Dov Murik
2021-09-05 14:05     ` Brijesh Singh
2021-09-05 17:03       ` Dov Murik
2021-09-05 17:03         ` Dov Murik
2021-08-26 22:26 ` [RFC PATCH v2 05/12] i386/sev: add the SNP launch start context Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 06/12] i386/sev: add support to encrypt BIOS when SEV-SNP is enabled Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 07/12] i386/sev: populate secrets and cpuid page and finalize the SNP launch Michael Roth
2021-09-03 20:24   ` Dov Murik
2021-09-03 20:24     ` Dov Murik
2021-09-07 16:18     ` Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 08/12] target/i386: set SEV-SNP CPUID bit when SNP enabled Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 09/12] target/i386: allow versioned CPUs to specify new cache_info Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 10/12] target/i386: add new EPYC CPU versions with updated cache_info Michael Roth
2021-08-26 22:26 ` [RFC PATCH v2 11/12] i386/sev: sev-snp: add support for CPUID validation Michael Roth
2021-09-05 10:02   ` Dov Murik
2021-09-05 10:02     ` Dov Murik
2021-09-07 16:50     ` Michael Roth
2021-09-07 17:44       ` Dov Murik
2021-09-07 17:44         ` Dov Murik
2021-08-26 22:26 ` [RFC PATCH v2 12/12] i386/sev: update query-sev QAPI format to handle SEV-SNP Michael Roth
2021-09-01 14:14   ` Markus Armbruster
2021-09-03 15:13     ` Michael Roth
2021-09-03 15:30       ` Daniel P. Berrangé
2021-09-03 15:30         ` Daniel P. Berrangé
2021-09-03 15:43         ` Michael Roth
2021-09-03 15:43           ` Michael Roth via
2021-09-03 15:58           ` Daniel P. Berrangé
2021-09-03 15:58             ` Daniel P. Berrangé
2021-09-03 16:01     ` Daniel P. Berrangé
2021-09-03 16:01       ` Daniel P. Berrangé
2021-09-04  5:41       ` Markus Armbruster
2021-09-07 11:52       ` Dr. David Alan Gilbert
2021-09-07 11:52         ` Dr. David Alan Gilbert
2021-09-07 14:33         ` Michael Roth
2021-09-07 14:33           ` Michael Roth via
2021-09-03 15:27   ` Daniel P. Berrangé
2021-09-03 15:27     ` Daniel P. Berrangé
2021-11-16  9:23 ` [RFC PATCH v2 00/12] Add AMD Secure Nested Paging (SEV-SNP) support Daniel P. Berrangé
2021-11-16  9:23   ` Daniel P. Berrangé
2021-11-16 11:54   ` Brijesh Singh

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.