Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1078727lqo; Fri, 17 May 2024 10:00:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUCgqkhPZy3GGWJkbopJJUUFm+XNta9hH2qvdiGvZ1ennC40B+deeFbzQUSnVyWyiozv0P5LIOstecrPoPZ2ovudtJjnj2m5WzgU4JvjQ== X-Google-Smtp-Source: AGHT+IFa1wo7H+wVUxN8doJrWHGB+AlYjZjfVP5MXfENPkzx/CCyGR0Ir7i1pzer7Ihj1ABm4UBh X-Received: by 2002:a17:902:e811:b0:1ed:1bab:5e85 with SMTP id d9443c01a7336-1ef43c0cef5mr257667375ad.2.1715965223174; Fri, 17 May 2024 10:00:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715965223; cv=pass; d=google.com; s=arc-20160816; b=JyShRViN47oB0Ztl/vresVTWvlmEj5fqmeVqutROKPR2khXRM0Rt+4a9uVoVWNSO+z osW9R//5MqfLQF8o4/VZD8VQkOYWiEgvcW1hMd69Ze3DH0+PFwJX87G9Tm8Y85XaVORM yPJKMF1Bs8sAXanSgbNz1sPcbJtJOhb+0POvHZ7CWOf+sR7HNhpnWQAcFrUEvRR2USnr 3pCZtQbjLDf7EaM7CElMx3A3sItnHxRjwfqcBgJ3AdJfB8K1ZAP8V69DiNvQ0APyzHAx GHUFKTczfHocqC7HyURI8U8PqDSNu2pC/HsTmisB+8y2sH74UvuP0BnDaSUueooocMhZ DXtg== 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=LTm+9lpug3OBBh2U6twbHkMgBlxFC/tDfal5Ud/GOWc=; fh=hXU1gnBYTQtxPAarsVIsRjsd20EbUeSZmvMOiujEIyU=; b=SwMZB/Cz7kEOke9ahSj4Vl9q9t2uoeu34H+F+oqJr6czNYNQkonfaaoVWOPNhmSMKA KT3xQU2c5P9THkLn5LpmXChE8cPEQzjoj0LV0Ow46CwJ6NQ65TXRhp7HDwPJhLt/LykU GVXhJA4dz+it3Qs9ogndnPc0QuUyYS0KFTFuskJvzLvFDnOSrt+zN09EEsgq1cluWN3L pBp1l5eJqIfNgAWo0xgofmecl7SaCq9aZuF6KsU446fmIWKfjkqVLa5NdPnYLqic3LCl 90eDnNAEQ0ivf22QRuY8jCEVobwi4e0jlaKkY22a0/kaoAdxvToF2FaE4PntD5hwxgaa 0DgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EYyUwNdA; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-182189-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182189-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 d9443c01a7336-1ef0bf314a2si168456945ad.279.2024.05.17.10.00.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 10:00:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182189-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=EYyUwNdA; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-182189-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182189-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 30F3C285B48 for ; Fri, 17 May 2024 14:21:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F8956CDBF; Fri, 17 May 2024 14:20:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EYyUwNdA" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 73C7D657C6; Fri, 17 May 2024 14:20:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715955603; cv=none; b=gpiZoxg60uZyYa3ehZLkj6h1Q5vUrTXMFnpH40YCQHLUA4MHQFJ+/vI58V9xfgQ43oEI861gSPSdNbpcZww4egBZ/Qb+j5gbFO/u7dQ5URAttjHl/KcWQct1a4uUJ4resPdE9+W7037SBL7dyXGaWY5IHmTIiAruFLFW4Laz8Lg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715955603; c=relaxed/simple; bh=tHoxgIZyyik8ZVUSPgSNSEV0q6AJ2EgF7vlCRqN3mxE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kbyIbm4Fg58vA36b8IfsR5mFgbFPjJhJBPysKCzwZARRZRBHWGjnAPtihmswGvLkAS+eGsASR8zsrxeY75u/12dy3GCJ+oQq2VHQfpP9EX1OoYOq6Bvn6hAmnTxNF2DbkgfzCsAlsqFcn7x5EZtHkuEuNGFjTs9utlrN/dlJdIY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.helo=mgamail.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=EYyUwNdA; arc=none smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.helo=mgamail.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715955602; x=1747491602; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tHoxgIZyyik8ZVUSPgSNSEV0q6AJ2EgF7vlCRqN3mxE=; b=EYyUwNdAoyjDI0w7glAiWiRowI1D6xRHpZZKIpCAYQ7h7TS4r5IvyVAY vUZFXukfB9cVZqvznMGvC6w+Hbr4J2Nf0FYTlgbgq9/DBgY+XXpDtJcfS 1hsqOubVbryDFFG4d6WtJn8iTnjvGXoX2Oz3fl5ZTPRjrWSwZassklLL8 cOeKk80PSJ6rMhyfs/Dz1VJOoaoAI/8ERl3XoBQ0jVtbHzh6nmM9uU2JU Ox3pGvVmm1V1DFHqf/MqcW4hm1yxE5jZCbxnzl2tH8OCPE7PgK+Va+860 ZwqfJEDupNHo/SVEAdHQXnngZ6T7+qiDS4arhNfm8tk0F/Nm7bX+jgwhH A==; X-CSE-ConnectionGUID: K31UD5VdQSuGlpc2zf8SVw== X-CSE-MsgGUID: mzBs00YySEKi7HZ9DpCmbQ== X-IronPort-AV: E=McAfee;i="6600,9927,11075"; a="22808631" X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208";a="22808631" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 07:20:00 -0700 X-CSE-ConnectionGUID: uDULCkgOSQu2dl08FomWMA== X-CSE-MsgGUID: W/Vz89qaTeKWBaSMYfnBdg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208";a="31944618" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa009.jf.intel.com with ESMTP; 17 May 2024 07:19:57 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 26C60D7E; Fri, 17 May 2024 17:19:50 +0300 (EEST) From: "Kirill A. Shutemov" To: Sean Christopherson , Paolo Bonzini , Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Josh Poimboeuf , Peter Zijlstra Cc: linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCH 10/20] x86/tdx: Convert GET_QUOTE hypercall to use new TDVMCALL macros Date: Fri, 17 May 2024 17:19:28 +0300 Message-ID: <20240517141938.4177174-11-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240517141938.4177174-1-kirill.shutemov@linux.intel.com> References: <20240517141938.4177174-1-kirill.shutemov@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use newly introduced TDVMCALL_0() instead of __tdx_hypercall() to issue GET_QUOTE hypercall. It cuts code bloat substantially: Function old new delta tdx_hcall_get_quote 188 76 -112 Signed-off-by: Kirill A. Shutemov --- arch/x86/coco/tdx/tdx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/coco/tdx/tdx.c b/arch/x86/coco/tdx/tdx.c index 7c874a50a319..3f0be1d3cccb 100644 --- a/arch/x86/coco/tdx/tdx.c +++ b/arch/x86/coco/tdx/tdx.c @@ -150,7 +150,8 @@ EXPORT_SYMBOL_GPL(tdx_mcall_get_report0); u64 tdx_hcall_get_quote(u8 *buf, size_t size) { /* Since buf is a shared memory, set the shared (decrypted) bits */ - return _tdx_hypercall(TDVMCALL_GET_QUOTE, cc_mkdec(virt_to_phys(buf)), size, 0, 0); + return TDVMCALL_0(TDVMCALL_GET_QUOTE, + cc_mkdec(virt_to_phys(buf)), size, 0, 0); } EXPORT_SYMBOL_GPL(tdx_hcall_get_quote); -- 2.43.0