Skip to content

Commit b774030

Browse files
committed
Merge: x86 confidential computing updates for RHEL 9.6
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4781 # Merge Request Required Information ## Summary of Changes * kexec support for TDX guests * vmware hypercall support for TDX guests * SVSM support for SNP guests ## Approved Development Ticket All submissions to CentOS Stream must reference an approved ticket in [Red Hat Jira](https://issues.redhat.com/). Please follow the CentOS Stream [contribution documentation](https://docs.centos.org/en-US/stream-contrib/quickstart/) for how to file this ticket and have it approved. ``` JIRA: https://issues.redhat.com/browse/RHEL-15585 JIRA: https://issues.redhat.com/browse/RHEL-49791 Depends: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5022 Depends: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5123 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> ``` Approved-by: Vitaly Kuznetsov <vkuznets@redhat.com> Approved-by: Rafael Aquini <raquini@redhat.com> Approved-by: Baoquan He <5820488-baoquan_he@users.noreply.gitlab.com> Approved-by: Steve Best <sbest@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2 parents f6e2d16 + 2e375a5 commit b774030

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2569
-491
lines changed

Documentation/ABI/testing/configfs-tsm

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ Description:
3131
Standardization v2.03 Section 4.1.8.1 MSG_REPORT_REQ.
3232
https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/specifications/56421.pdf
3333

34+
What: /sys/kernel/config/tsm/report/$name/manifestblob
35+
Date: January, 2024
36+
KernelVersion: v6.10
37+
Contact: linux-coco@lists.linux.dev
38+
Description:
39+
(RO) Optional supplemental data that a TSM may emit, visibility
40+
of this attribute depends on TSM, and may be empty if no
41+
manifest data is available.
42+
43+
See 'service_provider' for information on the format of the
44+
manifest blob.
45+
3446
What: /sys/kernel/config/tsm/report/$name/provider
3547
Date: September, 2023
3648
KernelVersion: v6.7
@@ -80,3 +92,54 @@ Contact: linux-coco@lists.linux.dev
8092
Description:
8193
(RO) Indicates the minimum permissible value that can be written
8294
to @privlevel.
95+
96+
What: /sys/kernel/config/tsm/report/$name/service_provider
97+
Date: January, 2024
98+
KernelVersion: v6.10
99+
Contact: linux-coco@lists.linux.dev
100+
Description:
101+
(WO) Attribute is visible if a TSM implementation provider
102+
supports the concept of attestation reports from a service
103+
provider for TVMs, like SEV-SNP running under an SVSM.
104+
Specifying the service provider via this attribute will create
105+
an attestation report as specified by the service provider.
106+
The only currently supported service provider is "svsm".
107+
108+
For the "svsm" service provider, see the Secure VM Service Module
109+
for SEV-SNP Guests v1.00 Section 7. For the doc, search for
110+
"site:amd.com "Secure VM Service Module for SEV-SNP
111+
Guests", docID: 58019"
112+
113+
What: /sys/kernel/config/tsm/report/$name/service_guid
114+
Date: January, 2024
115+
KernelVersion: v6.10
116+
Contact: linux-coco@lists.linux.dev
117+
Description:
118+
(WO) Attribute is visible if a TSM implementation provider
119+
supports the concept of attestation reports from a service
120+
provider for TVMs, like SEV-SNP running under an SVSM.
121+
Specifying an empty/null GUID (00000000-0000-0000-0000-000000)
122+
requests all active services within the service provider be
123+
part of the attestation report. Specifying a GUID request
124+
an attestation report of just the specified service using the
125+
manifest form specified by the service_manifest_version
126+
attribute.
127+
128+
See 'service_provider' for information on the format of the
129+
service guid.
130+
131+
What: /sys/kernel/config/tsm/report/$name/service_manifest_version
132+
Date: January, 2024
133+
KernelVersion: v6.10
134+
Contact: linux-coco@lists.linux.dev
135+
Description:
136+
(WO) Attribute is visible if a TSM implementation provider
137+
supports the concept of attestation reports from a service
138+
provider for TVMs, like SEV-SNP running under an SVSM.
139+
Indicates the service manifest version requested for the
140+
attestation report (default 0). If this field is not set by
141+
the user, the default manifest version of the service (the
142+
service's initial/first manifest version) is returned.
143+
144+
See 'service_provider' for information on the format of the
145+
service manifest version.

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,18 @@ Description: Umwait control
614614
Note that a value of zero means there is no limit.
615615
Low order two bits must be zero.
616616

617+
What: /sys/devices/system/cpu/sev
618+
/sys/devices/system/cpu/sev/vmpl
619+
Date: May 2024
620+
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
621+
Description: Secure Encrypted Virtualization (SEV) information
622+
623+
This directory is only present when running as an SEV-SNP guest.
624+
625+
vmpl: Reports the Virtual Machine Privilege Level (VMPL) at which
626+
the SEV-SNP guest is running.
627+
628+
617629
What: /sys/devices/system/cpu/svm
618630
Date: August 2019
619631
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>

Documentation/virt/coco/sev-guest.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,17 @@ has taken care to make use of the SEV-SNP CPUID throughout all stages of boot.
204204
Otherwise, guest owner attestation provides no assurance that the kernel wasn't
205205
fed incorrect values at some point during boot.
206206

207+
4. SEV Guest Driver Communication Key
208+
=====================================
209+
210+
Communication between an SEV guest and the SEV firmware in the AMD Secure
211+
Processor (ASP, aka PSP) is protected by a VM Platform Communication Key
212+
(VMPCK). By default, the sev-guest driver uses the VMPCK associated with the
213+
VM Privilege Level (VMPL) at which the guest is running. Should this key be
214+
wiped by the sev-guest driver (see the driver for reasons why a VMPCK can be
215+
wiped), a different key can be used by reloading the sev-guest driver and
216+
specifying the desired key using the vmpck_id module parameter.
217+
207218

208219
Reference
209220
---------

Documentation/x86/amd-memory-encryption.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,32 @@ SNP feature support.
131131
More details in AMD64 APM[1] Vol 2: 15.34.10 SEV_STATUS MSR
132132

133133
[1] https://www.amd.com/system/files/TechDocs/40332.pdf
134+
135+
Secure VM Service Module (SVSM)
136+
===============================
137+
SNP provides a feature called Virtual Machine Privilege Levels (VMPL) which
138+
defines four privilege levels at which guest software can run. The most
139+
privileged level is 0 and numerically higher numbers have lesser privileges.
140+
More details in the AMD64 APM Vol 2, section "15.35.7 Virtual Machine
141+
Privilege Levels", docID: 24593.
142+
143+
When using that feature, different services can run at different protection
144+
levels, apart from the guest OS but still within the secure SNP environment.
145+
They can provide services to the guest, like a vTPM, for example.
146+
147+
When a guest is not running at VMPL0, it needs to communicate with the software
148+
running at VMPL0 to perform privileged operations or to interact with secure
149+
services. An example fur such a privileged operation is PVALIDATE which is
150+
*required* to be executed at VMPL0.
151+
152+
In this scenario, the software running at VMPL0 is usually called a Secure VM
153+
Service Module (SVSM). Discovery of an SVSM and the API used to communicate
154+
with it is documented in "Secure VM Service Module for SEV-SNP Guests", docID:
155+
58019.
156+
157+
(Latest versions of the above-mentioned documents can be found by using
158+
a search engine like duckduckgo.com and typing in:
159+
160+
site:amd.com "Secure VM Service Module for SEV-SNP Guests", docID: 58019
161+
162+
for example.)

arch/x86/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,13 @@ config X86_LOCAL_APIC
11061106
depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI
11071107
select IRQ_DOMAIN_HIERARCHY
11081108

1109+
config ACPI_MADT_WAKEUP
1110+
def_bool y
1111+
depends on X86_64
1112+
depends on ACPI
1113+
depends on SMP
1114+
depends on X86_LOCAL_APIC
1115+
11091116
config X86_IO_APIC
11101117
def_bool y
11111118
depends on X86_LOCAL_APIC || X86_UP_IOAPIC

0 commit comments

Comments
 (0)