From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-mw2nam12on2077.outbound.protection.outlook.com ([40.107.244.77] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDDIe-0022Za-6C for kexec@lists.infradead.org; Mon, 09 Aug 2021 21:59:16 +0000 Subject: Re: [PATCH 06/11] x86/sev: Replace occurrences of sev_es_active() with prot_guest_has() References: From: Tom Lendacky Message-ID: <934f3e72-49d1-be56-6fa2-f37a02413fb2@amd.com> Date: Mon, 9 Aug 2021 16:59:00 -0500 In-Reply-To: Content-Language: en-US MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Joerg Roedel Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, iommu@lists.linux-foundation.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-graphics-maintainer@vmware.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kexec@lists.infradead.org, linux-fsdevel@vger.kernel.org, Borislav Petkov , Brijesh Singh , Andi Kleen , Sathyanarayanan Kuppuswamy , Tianyu Lan , Thomas Gleixner , Ingo Molnar On 8/2/21 5:45 AM, Joerg Roedel wrote: > On Tue, Jul 27, 2021 at 05:26:09PM -0500, Tom Lendacky wrote: >> @@ -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 > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec