Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp161254rdb; Mon, 22 Jan 2024 15:55:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGCmRDUOUp2g+OGXXEZ4KWA6M/nJMdLDDzMaY7DHGnJrr35Fiqg2VzaZgfXOR45lbhV3ZEz X-Received: by 2002:a37:e103:0:b0:783:1f5c:5e46 with SMTP id c3-20020a37e103000000b007831f5c5e46mr5901140qkm.96.1705967734318; Mon, 22 Jan 2024 15:55:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705967734; cv=pass; d=google.com; s=arc-20160816; b=woCkEXWSKf0sedDF9CynthCRC/1hxkTOrFXW6XNehKWcSdL+5BXbxa3i4wd/NaQ9Gm O8Cnw92Li0dI/G6MfdgK5oFCxCzw2hum7fqlXOwN6JdqehWU+0rimxtxQKhqWQwv6TZr Bw0nOfaPbwz4Afmt9UhNjeWAhVmm5Fsc4zRGCFdBOazGHEy4Tedr8lk28mAJeXTyUcHM QlSGRkgrBU5ligLE45n/ev1HbSGsTUBQ9h30YyRvdQbQPlQvGvM21XeHGvxUZXKXTSeO M6OruW6k+ZHfnLLNRIbP1JsiMJGCWNOP/djwTY1Wc7qXiEE4d/reQDhpZm79DGWKBQPd o/+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0WD0BcpRsI2ap198HMOnHkzKO3mhOdFfRpFq8n0vh44=; fh=Itbyk7CEvizIrzGEESCqq3I2tZgG1kc/GkVOa3S7Hsg=; b=jcPrWEgkpATzhk9CTp0d1H+QHvGL47ahu8Ji9hl+tBjC56H91LgGyoeHu9yYEhn6VD hB0jAJ+oUSQp+3I2JM4p7HNsCS4qFFPqqUcc+7spleDV6mSES6K7ETbV0Hrazq1tU6j8 0pR3hG16EugpuaONckWYV+/EKt2PU1lwYxjclMRqhq0BUbgiNhomHabD29QSA4btUSN8 fgcj9DXXhThP4Xo1izfUzJ48avR7u7rogSlnrFPfRHn89k26KpFdY7bOY4qPX81b1Yd+ Crs4r9DA378RFK1tm5aypF+DdCXlATwllDIG9CoLaD26ymrgBQLfiEqpHj6T730rZv75 aXow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DfwPEh5h; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-34310-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34310-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e13-20020a05620a208d00b00781d12ac757si6545412qka.783.2024.01.22.15.55.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 15:55:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34310-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DfwPEh5h; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-34310-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34310-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1725C1C20C87 for ; Mon, 22 Jan 2024 23:55:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43D334F5F2; Mon, 22 Jan 2024 23:54:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DfwPEh5h" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3B544EB2E; Mon, 22 Jan 2024 23:54:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705967695; cv=none; b=nq0+k7YZFXMmDZTUDKfD0hCF3EfyqrOlsLdc6/F+Fw8rKHqqsEXylBiC928nlFhbWk+MdKT9jvaL+WLnj62k0AhifpBB93U7cq5mE/U5iCjlDNvtopjZU5EQAsp7GEVVBWNGwiAfG3XLYJLlKg3/3o6GBzyYQ0liaNbB1xJBoE8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705967695; c=relaxed/simple; bh=MY4i1eRsMR25nJn5OI9pQXWHMolnb8eFBdBk5/3evCo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AOrIVX8RctngUvRAgu38JMfydBUJuYrtatFwmcjdZyi+QjqRO3dq9LVugIsNoydljrtz3AQST2zl5KHwOw0qjyXQh5MBy/NeQknZrr8FuK+jdsXostIXlPuIH02xcUEWrRmrcMF44kJc9PNccRjaT5sCuwag7uHwd/r5ghExCVM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=DfwPEh5h; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705967694; x=1737503694; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MY4i1eRsMR25nJn5OI9pQXWHMolnb8eFBdBk5/3evCo=; b=DfwPEh5hsidFfczzYW40SmiW8UUwZfsNoNWLm+7ztteonc+wCCtnoKoy M7QxKIeMDYpzck39L9qgPnOMniSYvTXQlcrGJ2zQflJspAa1e/1dvCDFv sBKQuf5n6FDYY6XAcLROysWJmQunZBlFaRP5i3NCavflcq54WbT88UM+L qZ8Mox2moAr031uf830dHaKoherGz9bZ33Rdhqt67vOtQ+HL5FLlFMUSB 4y4diROze/DRLRSxn1TV2LcCLcpGo4NRRE3mxW21NNo/+cgiaDNgSAokF /ONRV8HhCW5np819uBIAybBSq80yAwY3OS+5SUzGvQuPj9CuJ/HUhZ4Ss w==; X-IronPort-AV: E=McAfee;i="6600,9927,10961"; a="1217795" X-IronPort-AV: E=Sophos;i="6.05,212,1701158400"; d="scan'208";a="1217795" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 15:54:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,212,1701158400"; d="scan'208";a="1350104" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 15:54:51 -0800 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 , Kai Huang , chen.bo@intel.com, hang.yuan@intel.com, tina.zhang@intel.com Subject: [PATCH v18 002/121] x86/virt/tdx: Export SEAMCALL functions Date: Mon, 22 Jan 2024 15:52:38 -0800 Message-Id: <88bcf53760c42dafb14cd9a92bf4f9243f597bbe.1705965634.git.isaku.yamahata@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Kai Huang KVM will need to make SEAMCALLs to create and run TDX guests. Export SEAMCALL functions for KVM to use. Also add declaration of SEAMCALL functions to to support CONFIG_MODVERSIONS=y. Signed-off-by: Kai Huang --- arch/x86/include/asm/asm-prototypes.h | 1 + arch/x86/virt/vmx/tdx/seamcall.S | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h index b1a98fa38828..0ec572ad75f1 100644 --- a/arch/x86/include/asm/asm-prototypes.h +++ b/arch/x86/include/asm/asm-prototypes.h @@ -13,6 +13,7 @@ #include #include #include +#include #ifndef CONFIG_X86_CMPXCHG64 extern void cmpxchg8b_emu(void); diff --git a/arch/x86/virt/vmx/tdx/seamcall.S b/arch/x86/virt/vmx/tdx/seamcall.S index 5b1f2286aea9..e32cf82ed47e 100644 --- a/arch/x86/virt/vmx/tdx/seamcall.S +++ b/arch/x86/virt/vmx/tdx/seamcall.S @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ #include +#include #include #include "tdxcall.S" @@ -21,6 +22,7 @@ SYM_FUNC_START(__seamcall) TDX_MODULE_CALL host=1 SYM_FUNC_END(__seamcall) +EXPORT_SYMBOL_GPL(__seamcall); /* * __seamcall_ret() - Host-side interface functions to SEAM software @@ -40,6 +42,7 @@ SYM_FUNC_END(__seamcall) SYM_FUNC_START(__seamcall_ret) TDX_MODULE_CALL host=1 ret=1 SYM_FUNC_END(__seamcall_ret) +EXPORT_SYMBOL_GPL(__seamcall_ret); /* * __seamcall_saved_ret() - Host-side interface functions to SEAM software @@ -59,3 +62,4 @@ SYM_FUNC_END(__seamcall_ret) SYM_FUNC_START(__seamcall_saved_ret) TDX_MODULE_CALL host=1 ret=1 saved=1 SYM_FUNC_END(__seamcall_saved_ret) +EXPORT_SYMBOL_GPL(__seamcall_saved_ret); -- 2.25.1