Skip to content

RFC Add AMD Secure Nested Paging (SEV-SNP) support

Brijesh Singh kvm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 38 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6linux-header: add the SNP specific commandlinux-headers/linux/kvm.h+47 -04 replies
2/6i386/sev: extend sev-guest property to include SEV-SNPdocs/amd-memory-encryption.txt qapi/qom.json target/i386/sev.c+312 -215 replies
3/6i386/sev: initialize SNP contexttarget/i386/sev.c target/i386/sev_i386.h+22 -32 replies
4/6i386/sev: add the SNP launch start contexttarget/i386/sev.c target/i386/trace-events+30 -12 replies
5/6i386/sev: add support to encrypt BIOS when SEV-SNP is enabledtarget/i386/sev.c target/i386/trace-events+33 -14 replies
6/6i386/sev: populate secrets and cpuid page and finalize the SNP launchtarget/i386/sev.c target/i386/trace-events+184 -24 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/6] Add AMD Secure Nested Paging (SEV-SNP) support

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.

The patches to support the SEV-SNP in Linux kernel and OVMF are available:
https://lore.kernel.org/kvm/[email protected]/
https://lore.kernel.org/kvm/[email protected]/
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.

TODO:
* Add support to filter CPUID values through the PSP.

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: extend sev-guest property to include SEV-SNP 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

 docs/amd-memory-encryption.txt |  81 +++++-
 linux-headers/linux/kvm.h      |  47 ++++
 qapi/qom.json                  |   6 +
 target/i386/sev.c              | 498 ++++++++++++++++++++++++++++++++-
 target/i386/sev_i386.h         |   1 +
 target/i386/trace-events       |   4 +
 6 files changed, 628 insertions(+), 9 deletions(-)
Signature · 1 line
2.17.1