From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCA76C43214 for ; Mon, 2 Aug 2021 10:45:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B953360FA0 for ; Mon, 2 Aug 2021 10:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233387AbhHBKpf (ORCPT ); Mon, 2 Aug 2021 06:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233176AbhHBKpf (ORCPT ); Mon, 2 Aug 2021 06:45:35 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E387C06175F; Mon, 2 Aug 2021 03:45:26 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id A1662379; Mon, 2 Aug 2021 12:45:24 +0200 (CEST) Date: Mon, 2 Aug 2021 12:45:23 +0200 From: Joerg Roedel To: Tom Lendacky 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 Subject: Re: [PATCH 06/11] x86/sev: Replace occurrences of sev_es_active() with prot_guest_has() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org 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. Regards, Joerg