Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1460342rbb; Mon, 26 Feb 2024 09:55:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUjRPvP5E87zqj4fWyNDLiyxfabempI7TAk2PhvjQEEPl2iASrifeFzN8NobmBFwvPq2nmdF5tyUwaGjgd0B57ygzEAY1HA9QLoDKctwg== X-Google-Smtp-Source: AGHT+IGCMoS+Gy1GIWfi+Nti24PZidmQJIqvTo9q4doXoWl0LrzTlidJLpSS8ZeGlE7RGy7C43M7 X-Received: by 2002:a05:6a00:9382:b0:6e5:3434:d5e0 with SMTP id ka2-20020a056a00938200b006e53434d5e0mr3502198pfb.2.1708970147752; Mon, 26 Feb 2024 09:55:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708970147; cv=pass; d=google.com; s=arc-20160816; b=0lDMrHBazhGIopIRLdnvbE8hR3GcU6u77GounfKnSrMMrvMEguoNuBkkkH1/KiFfZx BNj6wtIMXNsEvAtUosgn5uVFjKwG8u4cyu/Fat9OyT6jPKqNwSgsKYYkcK+X41oJwhqm xDEKxRsIhx3DROqqJzdLIZFqgZMt7zYv5edAIeMkNF8BGHhAN0Vrcpfex4nM8MFtq9wV QHtIUEzRrxwLx+w+68bi1P3MjvsGY0qB+cpPKpVkpPm/sFBqfS9mkX4O9q0hzHvebESF ZEf3N/MrBsdWQWZ1zowiXLxr11jqM60IGckHR7EBw3g68ZheDnKVXoc6Ng1HvxhzUedc Co7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pPra3FdZBzi9fzQbMddeVaALT5C2nWNzQa21oXNDRqQ=; fh=m3OEjHiXYvVNy3TYrseGZ6IzJiOJfEaDJE5RufTYtCY=; b=P0qpnm6uYpqo9nWh0G2ihb/WT89VpQb99pakYAbiL7v06gk5vbQ+ANNGQAb4iMqMHy BeS7hbBWF3s+3Cfb4iiklAofrWspgXFaa1qZVWKWl5e8cIUgbkZfsxc1A6QTFY347r2V RSkyH1Hcyao9bZ4fwqKga6T+Pse5lSEkT2BA2CxjVDERlytP+TdCWdV84kWVCCh1PbeZ 67Tv/ZSlqpfGf9Q8gLFkTt8CmWpD0g56HOCiUk6ora7Dgshj94RZ6pOHZJ1E1yiwGhS0 5TonYhinI0Zs5LNEH8hIadCMeNpwz2nc4m/vhG2VNos2I7yJ/qRFgU2PPo/7Be8vkMO5 suFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=E4Btn5JY; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-82103-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82103-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q10-20020a63f94a000000b005dc4fda246esi3983613pgk.615.2024.02.26.09.55.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:55:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82103-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=E4Btn5JY; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-82103-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82103-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D9E2C294415 for ; Mon, 26 Feb 2024 17:51:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9031712E1F5; Mon, 26 Feb 2024 17:51:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="E4Btn5JY" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 E7B3712D761; Mon, 26 Feb 2024 17:51:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708969870; cv=none; b=H/m6mrTo6caVdhK//SSXfIuc6HJiaTvSs3LxOphve3XpZXeloalg72Xk7z0LlK2iB1yG36v2hMLZISgfYD2vIpTCXb3mKhy3k4sKoloEym831YHjxpgnsFDWys1ntqT8WSjgJyMaMUCn2DBhtESFKAaU6Z28c3i4H/x1Q4kpo6U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708969870; c=relaxed/simple; bh=owWO0s5BBeKOkXbuxjeZxkyZEXYg+69HBcHtLINwK3I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TfR1dK+nEtrE1xjTFgldZtGonzU+56X9RQavLX3SHwUZqqIyNOZ8oA0sskno1irp6yaJ75s3OXewyHrDD6CpcWZRLY6bRtWre6aqC/Fc0Cl0dVKDEBlAc4H+u2+eP+jtBgXAk5iL45zduKk4Xe7d+hnyR3SwbX95fg3LOTgEBn8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=E4Btn5JY; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.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=1708969869; x=1740505869; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=owWO0s5BBeKOkXbuxjeZxkyZEXYg+69HBcHtLINwK3I=; b=E4Btn5JYOllVp5f1BlE2SG1zXBwXUSlqLHohKlaOsLtjVHNtQhCOWL3T M91QqTTnTMPmgHaHCje5X7LLj+WZVi0P40IZlk8HpEqEAu1NSBJPXh8oA aj9PSVHJQU8xm/ixB0QFzNt9gyd2doonDCY/c+RpJ/pBnRL0G8a+lqJuZ 8MJK/HvzAg32aBdfd46IsGXi2Qd6QxiKxp+LCvDzV5PxJWSNFWuP3YLov OHxpYYG4r2pwLA4ES5YekWQHUiWv1eHGS3+a5vDoQrLD/hayWNoFN2xnN yk5ipv42uRuO/5u1FXPhip1aYsX3wM68GTaiXRh8gugq61h+nVdTwytq5 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10996"; a="28708540" X-IronPort-AV: E=Sophos;i="6.06,186,1705392000"; d="scan'208";a="28708540" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 09:51:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,186,1705392000"; d="scan'208";a="11319420" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 09:51:07 -0800 Date: Mon, 26 Feb 2024 09:51:07 -0800 From: Isaku Yamahata To: Paolo Bonzini Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, erdemaktas@google.com, Sean Christopherson , Sagi Shahar , Kai Huang , chen.bo@intel.com, hang.yuan@intel.com, tina.zhang@intel.com, isaku.yamahata@linux.intel.com Subject: Re: [PATCH v18 002/121] x86/virt/tdx: Export SEAMCALL functions Message-ID: <20240226175107.GB177224@ls.amr.corp.intel.com> References: <88bcf53760c42dafb14cd9a92bf4f9243f597bbe.1705965634.git.isaku.yamahata@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Feb 08, 2024 at 02:30:40PM +0100, Paolo Bonzini wrote: > On Tue, Jan 23, 2024 at 12:54 AM wrote: > > > > 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 > > I thought you were going to introduce builtin functions for SEAMCALLs > needed by KVM, instead? After I talked with Kai, I concluded to use the common function. Probably for TDH.VP.ENTER, we'd like to use customized version to avoid shuffling registers between struct tdx_module_args and KVM regs. We can do it later as optimization. -- Isaku Yamahata