From patchwork Thu Apr 27 19:06:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Hansen X-Patchwork-Id: 88372 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp484661vqo; Thu, 27 Apr 2023 12:25:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7HsTJ6ARwPMbjY3oOCAyAnJhf27vuwZtlIh7nsMTG1kn3Uzbd1EdU4p/TVqSb8blZx2w/B X-Received: by 2002:a17:902:e549:b0:19c:a9b8:4349 with SMTP id n9-20020a170902e54900b0019ca9b84349mr3469540plf.32.1682623529858; Thu, 27 Apr 2023 12:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682623529; cv=none; d=google.com; s=arc-20160816; b=CB6TSBvB3QwLKAYf6OR+MluXq6gogYw6Fx9FKXNZCPhON1Xo0jMuxKxICXKsfzyrLF kwFpnIYbx9hQCBvloCQLcyKqL3Z7WTuPc3GuOabT8Bin30HhH+p7Ay//cUePDKy0eOw1 0JXnoe5HjNNvBdmO9+a3MKz6fUG8gZUPvi+73Dezg3KzuIgHmvA/QcDY+v1UQnPJJ1R7 tHG8QmKysz7nH5KsQM2QsDD8UuH98EniuKAYKKMXejltS8qCRI9pLBsH5BEpwI2bFos2 gZNDwNnOYuYCtAdy2uYcEHzqzfljf5K0o2cxPdS51JLFqvVzbgTisHuwO8guutpRn//f mZPA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=UQZJ/WuJxoQeM715LuZkGfPAdNtq5d6KKfuya3TUSrw=; b=rHjnrDmuK/TYDqbrHQvSvVgsRy4NrZ+naqD7Bcb0806yZQ/x77/1a2EI7OIBnAJnda Qs/5qjSzCDPdPd5+qAfw3kqVyNnlSr1k7g1k0TGm0EnlpPUjvxa0mgpP+D0VOIxqTYdE pSIto8emd3nYAr6zpRa9fplZPi7y+Rx5i0fHjhPcCx3P2yO87TGoxIWL3YIxUQhg2e+v J6+T6+QS20cUVvp1rjZmX60E2oRrLas2JLQ3ErI6yirNnZ/4oaOvtCltHq87qwaRdrTh EFNNQAsZBNRgDfdbWpS0txfGVOdakFaChzzZ/FdAkOIqVm9xpm2zMY1javd98FaB+tcZ xJCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SwSwA7k0; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j1-20020a170902da8100b001a920be2722si21750070plx.610.2023.04.27.12.25.16; Thu, 27 Apr 2023 12:25: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=SwSwA7k0; 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 S244653AbjD0THd (ORCPT + 99 others); Thu, 27 Apr 2023 15:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244646AbjD0THb (ORCPT ); Thu, 27 Apr 2023 15:07:31 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FA772694 for ; Thu, 27 Apr 2023 12:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682622441; x=1714158441; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OgQAqO99SmndNjrWe+916u5vGrg8g9TMY8iNMFotTeY=; b=SwSwA7k0Ee2yhe0yU/NT9bt/1uOAywt5UyavmpqA5QJFgcDKSZqnGfx+ 4W3s2e0qY7fmkLlc8hfYJ0EAL8IlWwtuEDpNCOeKXZhagA7CTBoH+8a4j GiDr3FY/2UnMXuWTyQYWgCPy06HC3en6dpE6h/1fwywiQQNMyJtFEsdHj PjQJSLY0+0GvD4h46IN3AdDgzPqxb0fdkczfvdJAM2mc5M2eja9m71R8w LiRwDfBlnrhQ/rfS1G+4d0hesmisoP//8JINZztQNIiq0fDr3G1V51xVS CB0yAa80ZTg1vV0bxhNM9Me5xEXloehDAOeXWS2w2fkyamH30D2oVVGAq w==; X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="347562924" X-IronPort-AV: E=Sophos;i="5.99,232,1677571200"; d="scan'208";a="347562924" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2023 12:07:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="940777452" X-IronPort-AV: E=Sophos;i="5.99,232,1677571200"; d="scan'208";a="940777452" Received: from viggo.jf.intel.com (HELO ray2.sr71.net) ([10.54.77.144]) by fmsmga006.fm.intel.com with ESMTP; 27 Apr 2023 12:07:20 -0700 From: Dave Hansen To: torvalds@linux-foundation.org Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Dave Hansen Subject: [GIT PULL] x86/tdx for 6.4 (take 2) Date: Thu, 27 Apr 2023 12:06:53 -0700 Message-Id: <20230427190653.1076577-1-dave.hansen@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764358650107118151?= X-GMAIL-MSGID: =?utf-8?q?1764358650107118151?= Hi Linus, Please pull a single x86/tdx change for 6.4. The original assembly here took two flags in %RSI to tweak its behavior at runtime. PeterZ recently axed one flag. Kill the other and tweak the 'output' mode with an assembly macro instead. This results in elimination of one push/pop pair and overall easier to read assembly. This "take 2" has a proper signed tag in the tip repo instead of an unsigned one in my test repo. --- The following changes since commit e8d018dd0257f744ca50a729e3d042cf2ec9da65: Linux 6.3-rc3 (2023-03-19 13:27:55 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tags/x86_tdx_for_6.4 for you to fetch changes up to 7a3a401874bea02f568aa416ac29170d8cde0dc2: x86/tdx: Drop flags from __tdx_hypercall() (2023-03-22 11:36:05 -0700) ---------------------------------------------------------------- * Do conditional __tdx_hypercall() 'output' processing via an assembly macro argument rather than a runtime register. ---------------------------------------------------------------- Kirill A. Shutemov (1): x86/tdx: Drop flags from __tdx_hypercall() arch/x86/boot/compressed/tdx.c | 4 +-- arch/x86/coco/tdx/tdcall.S | 66 ++++++++++++++++++++++----------------- arch/x86/coco/tdx/tdx.c | 18 +++++------ arch/x86/include/asm/shared/tdx.h | 5 ++- 4 files changed, 51 insertions(+), 42 deletions(-)