Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4658211iob; Sun, 8 May 2022 20:54:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd5o4PI0LzuVH8FWo4AVb63RCSZlCZGLkk71bSnaQIiMwKIcOTf+/EDQNQ1TXx89sVYZVo X-Received: by 2002:a17:90b:3508:b0:1dc:c275:3e18 with SMTP id ls8-20020a17090b350800b001dcc2753e18mr16176916pjb.245.1652068494326; Sun, 08 May 2022 20:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652068494; cv=none; d=google.com; s=arc-20160816; b=Fsmo+fooFUT+LoTryAfsHYRsOiEgPkwSbQngW35XMLsopqbvdO2zAOCY4e+EITlkCy pS7A2gDw/ufRm+GV5WAU5F2Tg6ej/WZxJPXDYb1d8lx07Qnh4nJRHNDQcOj9h7OkA7UJ BAyKqDK77NBFxmUQW/LM4/ayrNuAu5tuX0TXHD1Nxkuxb9A4GpOGzxysZk+UsiV5C7WU NCgXKUWLDgNFrzv2rq3RxoYkuX+KSqvOGD7TJS1cXLkTJnLY6sHS8rJUi3E+igXmekeK uoZuxrPPERqRsbhlQBDhC5pa8NXdvJnJLefQC5r9xaJ9TdiGn0EHwm3qUVH4EgBDJynx GRJg== 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=eAmTljAvoG83paJpuF0M7hFPOeYNb8WTr8jlr5nR2HU=; b=Gaa97QdH0DjxC5KBoqYEqmuZE8aBk0rOPw8EGI77v5DN5IfYOlqHVrszPHxR0VpXJz n+eG/0SCgbL1+HEgTiGhptyUeYAmGvTE/hONidguJzu2IEkzqwxT9arOh6elFtYfN33A OeOv/PAWr82ueydxHo/Zc+3fNdJ9R90EAkIW19hpuA5k7nMQuwnxVoOCz/nGe7oZBM7z mb2G6B5zwjerbhEY7TGh3/gxA+752cZMlw3W/uRuDh4emTrGma0MAx8PzR1baQQmDrDT w1ddqn0O+hd+koOWTaRu/obpOtnElA+6ixSi/PWRqIgOgqPGfvURn6+j5PsCaaHOJTYZ gehA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VM5gwPga; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h5-20020a632105000000b003bc321e6d61si12822813pgh.379.2022.05.08.20.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:54:54 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VM5gwPga; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 420171A065; Sun, 8 May 2022 20:52:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384336AbiEES3K (ORCPT + 99 others); Thu, 5 May 2022 14:29:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383176AbiEESTl (ORCPT ); Thu, 5 May 2022 14:19:41 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2BDA15734; Thu, 5 May 2022 11:15: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=1651774551; x=1683310551; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+4NUmFZ8LyOytDGfSFdAHw6TxIUqH8yTed5boLRoo/E=; b=VM5gwPga+tnFGOfUBPsGK820V90Sy0MjuX/M3JaLZO265aE9O5LXfHnQ G3/BYYYAkUZLcCanSCrVn62m+WHD1Y2rnZd35pbkXwPNpdRtpk19tYhpp QxyktSGR0ngw7UXW55RBNA4iRqOvUvqHIiXe9Lt2kj+hf5mT1cQYfyOly C0dMIwKqnQl4za3UOyHxhU/m3C6HW2GnwlUM+Fopi/1Q3cTxqYWz7Pr+4 7FX+IHymuJFLdsaMEa3C8G5V8PzeU1+nMMBhI6l3uno1uScjqvG6aJD9a VfQkZ3be7d952MajL+nt7y+G9zEyWhppI813VABw0o6lDgHUO4qS2DTWD w==; X-IronPort-AV: E=McAfee;i="6400,9594,10338"; a="248741980" X-IronPort-AV: E=Sophos;i="5.91,202,1647327600"; d="scan'208";a="248741980" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 11:15:40 -0700 X-IronPort-AV: E=Sophos;i="5.91,202,1647327600"; d="scan'208";a="665083141" Received: from ls.sc.intel.com (HELO localhost) ([143.183.96.54]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 11:15:39 -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 , erdemaktas@google.com, Sean Christopherson , Sagi Shahar Subject: [RFC PATCH v6 005/104] x86/virt/vmx/tdx: export platform_has_tdx Date: Thu, 5 May 2022 11:13:59 -0700 Message-Id: <78d9874f2c6b6006fd9ba4250ead6df064b6b82b.1651774250.git.isaku.yamahata@intel.com> 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=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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_has_tdx() 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 8c49ca40b6ad..b6c82e64ad54 100644 --- a/arch/x86/virt/vmx/tdx/tdx.c +++ b/arch/x86/virt/vmx/tdx/tdx.c @@ -1715,3 +1715,4 @@ bool platform_has_tdx(void) { return seamrr_enabled() && tdx_keyid_sufficient(); } +EXPORT_SYMBOL_GPL(platform_has_tdx); -- 2.25.1