Thread (43 messages) 43 messages, 9 authors, 2021-08-13

Re: [PATCH 06/11] x86/sev: Replace occurrences of sev_es_active() with prot_guest_has()

From: Tom Lendacky <thomas.lendacky@amd.com>
Date: 2021-08-09 21:59:08
Also in: amd-gfx, dri-devel, kexec, kvm, linux-efi, linux-fsdevel, linux-iommu, linux-s390, lkml, platform-driver-x86

On 8/2/21 5:45 AM, Joerg Roedel wrote:
On Tue, Jul 27, 2021 at 05:26:09PM -0500, Tom Lendacky wrote:
quoted
@@ -48,7 +47,7 @@ static void sme_sev_setup_real_mode(struct trampoline_header *th)
 	if (prot_guest_has(PATTR_HOST_MEM_ENCRYPT))
 		th->flags |= TH_FLAGS_SME_ACTIVE;
 
-	if (sev_es_active()) {
+	if (prot_guest_has(PATTR_GUEST_PROT_STATE)) {
 		/*
 		 * Skip the call to verify_cpu() in secondary_startup_64 as it
 		 * will cause #VC exceptions when the AP can't handle them yet.
Not sure how TDX will handle AP booting, are you sure it needs this
special setup as well? Otherwise a check for SEV-ES would be better
instead of the generic PATTR_GUEST_PROT_STATE.
Yes, I'm not sure either. I figure that change can be made, if needed, as
part of the TDX support.

Thanks,
Tom
Regards,

Joerg
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help