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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05C5AC433F5 for ; Tue, 28 Sep 2021 21:02:05 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A9126610C8 for ; Tue, 28 Sep 2021 21:02:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A9126610C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 73A77415C7; Tue, 28 Sep 2021 21:02:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R6b-RGbgO_rE; Tue, 28 Sep 2021 21:02:03 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 62AA1407B1; Tue, 28 Sep 2021 21:02:03 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 415AAC0011; Tue, 28 Sep 2021 21:02:03 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id B9BA1C000D for ; Tue, 28 Sep 2021 21:02:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 937C241575 for ; Tue, 28 Sep 2021 21:02:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZpoRlho-diK7 for ; Tue, 28 Sep 2021 21:02:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by smtp4.osuosl.org (Postfix) with ESMTPS id 08E38407B1 for ; Tue, 28 Sep 2021 21:02:00 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10121"; a="285819552" X-IronPort-AV: E=Sophos;i="5.85,330,1624345200"; d="scan'208";a="285819552" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 14:02:00 -0700 X-IronPort-AV: E=Sophos;i="5.85,330,1624345200"; d="scan'208";a="554303878" Received: from oogunmoy-mobl1.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.212.221.219]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2021 14:01:58 -0700 Subject: Re: [PATCH v4 0/8] Implement generic cc_platform_has() helper function To: Borislav Petkov References: <20210928191009.32551-1-bp@alien8.de> <80593893-c63b-d481-45f1-42a3a6fd762a@linux.intel.com> <7319b756-55dc-c4d1-baf6-4686f0156ac4@linux.intel.com> From: "Kuppuswamy, Sathyanarayanan" Message-ID: <695a3bf6-5382-68df-3ab5-8841b777fca2@linux.intel.com> Date: Tue, 28 Sep 2021 14:01:57 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Cc: linux-efi@vger.kernel.org, kvm@vger.kernel.org, David Airlie , Benjamin Herrenschmidt , dri-devel@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, Paul Mackerras , Will Deacon , Ard Biesheuvel , linux-s390@vger.kernel.org, Andi Kleen , Michael Ellerman , x86@kernel.org, amd-gfx@lists.freedesktop.org, Christoph Hellwig , Christian Borntraeger , VMware Graphics , Dave Young , Tom Lendacky , Thomas Zimmermann , Vasily Gorbik , Heiko Carstens , Maarten Lankhorst , Maxime Ripard , Andy Lutomirski , "Kirill A. Shutemov" , kexec@lists.infradead.org, LKML , iommu@lists.linux-foundation.org, Daniel Vetter , linuxppc-dev@lists.ozlabs.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On 9/28/21 1:58 PM, Borislav Petkov wrote: > On Tue, Sep 28, 2021 at 01:48:46PM -0700, Kuppuswamy, Sathyanarayanan wrote: >> Just read it. If you want to use cpuid_has_tdx_guest() directly in >> cc_platform_has(), then you want to rename intel_cc_platform_has() to >> tdx_cc_platform_has()? > > Why? > > You simply do: > > if (cpuid_has_tdx_guest()) > intel_cc_platform_has(...); > > and lemme paste from that mail: " ...you should use > cpuid_has_tdx_guest() instead but cache its result so that you don't > call CPUID each time the kernel executes cc_platform_has()." > > Makes sense? Yes. But, since the check is related to TDX, I just want to confirm whether you are fine with naming the function as intel_*(). Since this patch is going to have dependency on TDX code, I will include this patch in TDX patch set. > -- Sathyanarayanan Kuppuswamy Linux Kernel Developer _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu