Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3376789iog; Mon, 27 Jun 2022 14:56:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sIdq2yURnhLCGVrd6jBUsPSceWgPcrbZqGZ9QM96XQmS1jvnu8vMauUCu3H5JTfTdRp9+X X-Received: by 2002:a17:903:2311:b0:16a:6b9c:2b4d with SMTP id d17-20020a170903231100b0016a6b9c2b4dmr266861plh.100.1656366989759; Mon, 27 Jun 2022 14:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656366989; cv=none; d=google.com; s=arc-20160816; b=SJRMnzZu1QMiDYq90qyV0zrMhbBkTlYqiOhps2qh8/bCht4qbLgY5POMQfVyDtYhwc gn0xK01TMNhXITVQpF2twg7SI1aJe7MdvxNH997wZp8kqi8WoDvfsq0Jw8Ht10BissEI 2w/s/z8QnvKYc/cvReXsOlElS3jVcYLp5TBL5MWs0tWqE2Y+9l4a716YmG7i6Rl8zYI1 oZhKQBvoH2MSNYVq7/kvpGBK++HeYtI1lyPw63RGdN+J9txl9IJGud2VMjrY6eHYr3b8 Ti053G8R/OuSIwWKMvTgZMVqXUdGNhklxbhdebaUyGz8+apbPwoyEFwYNM7FmS2MppP8 Dcgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ckaqi3XlFcgIeZ6F6HYhdZcuTQbDJueh7F/Gig9D1Sc=; b=zSjUkF0u5LB1JIwDTv7j1iQdp9ltZ39vX/0MPJ2p+Zdx7oSi+/veFDJrmoHX8kzw8x DLxovn1tHUyQqfg2juDL1JMZ/Ku1AJl7jp59Ij693LT6OvLbnYfDc0nRkiTIAu/AxHha rLjXV1iqJzsbb/By6hoCQTXZOGxVtcMmKPgD0yYM1QrFWJJyZt86sgzTmUvCa26ECoBi CgbdX1l9b8Z9bCjIMj8h4WfJ4fKTVOTC5zqGia9+bds/am1ihTDOSmZjw46Kp12wkPld EiXmQP9OEbEfXsemAnaNn8xpyplhcnuck7l4xQBuQAQyABoY8E6/Ud5lPz38glpoZOB1 7qNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UMPtI7X7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020a170902ce0300b0016a1aba9f86si15399928plg.326.2022.06.27.14.56.18; Mon, 27 Jun 2022 14:56:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UMPtI7X7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241476AbiF0VzY (ORCPT + 99 others); Mon, 27 Jun 2022 17:55:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241233AbiF0Vyu (ORCPT ); Mon, 27 Jun 2022 17:54:50 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1215B62E0; Mon, 27 Jun 2022 14:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656366890; x=1687902890; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9aCDkqWmy71QgIukS8SMgSb50YpGTMxCRqgvkc783EI=; b=UMPtI7X7SSb1oqPMnvDh5jH6sA8kti5pA5lc5zwrJI8/1heKj5+TLTcn 4CafRqdgL5QHWAlIIz/U8ZiB+m0Gbs++3Kfqcp7FEPMHfHG1fFsh7zTY4 UjUXFhAJtvoF9ZWtUqrovofztCqCBAQl6ZKTAZvWlw4gHE/Q0H3kgnMia d4DrgjNSUbq2WQmMW5Wu2Gd95sy3CKvRV0A0rme2u/zDt5Xcx7KmE46hx LPytWVKJotuuszXH9ZcPVOxwC+xZiyDGXhoIwgqEJSRfoPChhECvXGCPe X1zfGjd8j+2Fxv9qNjopOCU00hW5FjWBUohS3ezoEaxgL7VkIBt4fh4J/ w==; X-IronPort-AV: E=McAfee;i="6400,9594,10391"; a="282662717" X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="282662717" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2022 14:54:48 -0700 X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="657863443" Received: from ls.sc.intel.com (HELO localhost) ([143.183.96.54]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2022 14:54:48 -0700 From: isaku.yamahata@intel.com To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: isaku.yamahata@intel.com, isaku.yamahata@gmail.com, Paolo Bonzini Subject: [PATCH v7 005/102] x86/virt/vmx/tdx: export platform_tdx_enabled() Date: Mon, 27 Jun 2022 14:52:57 -0700 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Isaku Yamahata TDX KVM uses platform_tdx_enabled() via vmx_hardware_setup() to check if the platform supports TDX, concretely CPU SEAM mode, irrespective of TDX module is loaded or initialized. Signed-off-by: Isaku Yamahata --- arch/x86/virt/vmx/tdx/tdx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c index 1363998ce1a9..f9a6f8bdade8 100644 --- a/arch/x86/virt/vmx/tdx/tdx.c +++ b/arch/x86/virt/vmx/tdx/tdx.c @@ -1285,6 +1285,7 @@ bool platform_tdx_enabled(void) { return tdx_keyid_num >= 2; } +EXPORT_SYMBOL_GPL(platform_tdx_enabled); /** * tdx_init - Initialize the TDX module -- 2.25.1