From patchwork Tue Oct 3 06:24:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Xin3" X-Patchwork-Id: 147648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1898564vqb; Mon, 2 Oct 2023 23:55:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEG8Bpy9A8ddWuV9UX6cG6SnUIUDhpl0tFjzAOJoRBIjVlKEzKXFGkdxiTWH81r4m1OWDTZ X-Received: by 2002:a05:6808:20a8:b0:3a8:5133:482d with SMTP id s40-20020a05680820a800b003a85133482dmr16635565oiw.35.1696316108973; Mon, 02 Oct 2023 23:55:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696316108; cv=none; d=google.com; s=arc-20160816; b=L0d0+UPtk5IZA07mjnGrrsRSuAh2s1EllckDDk0F049KvCTgbQCRhmgDII6wX8jCBP JbAiZBJJqlp5A+CcApZKGqG/KGmu1Y27sddGRVYVUvPKUhW01n3ldcP3Oevdf9J3OlYy 1A9ZyCzsOuzdx+jm3JBuUNXAoHz1y6S/uOXwuzguHTOHeZr52/Sq9Pk3JkGDEUp2zZGZ 5xh+LPfh+RXNGGMWNV7ec2Ah2BJogJ+UkBmtor7mEaPSFvFXYOgOv6xEWrvlmqGNj8lv EhKJhX2SnomFdETNFxeUMVYkgptuQatJALuWlKi01ZJ55+niZTf/qpY7CSV5rcE1TbQV mGjQ== 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=E6068ho+QcZBGYoTFydsOWHWjNX/l66/vvmNH2/4f34=; fh=Tb1p8S3iOxe/kX/WSNC3xEJzSVgGJ5DaxSrKb+pzH+4=; b=BHXuCGv9Z/8LNlwF3SFd1M7+XEmvzriPL6rnIwJfsw5TC6dtJmm8WnPwr3awdaADXS iT+ikWuuoivPG8S/EiB9UzmGiNoS9V4oIPJU+q/hwAlF+znMenrguS3v4A7UNriz8jXq M41Lp/6BC0utgFeNUbz50GIhW3akrPpWb7+U5ZhetGfaVQJA0IUzGuFucPPHxXH4r+O+ iWCTSenZh+XtFmoAxhlDHwUe8cwyOGxDZWG5WKFgbEY8uCMv3Gx1HJK936Wv6qS8AHgI dKYRo1Ga9ZJe+T6Nv/v5JjxNbCdqf45H+ky1+4BE5rBCrFCEHGePd8/ai3B338wVcwz8 6wiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OwLVC44m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id y193-20020a638aca000000b005859cd26197si773617pgd.455.2023.10.02.23.55.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 23:55:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OwLVC44m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D9A44822DA3C; Mon, 2 Oct 2023 23:55:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239283AbjJCGzC (ORCPT + 18 others); Tue, 3 Oct 2023 02:55:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239184AbjJCGyv (ORCPT ); Tue, 3 Oct 2023 02:54:51 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B51F3DD; Mon, 2 Oct 2023 23:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696316083; x=1727852083; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=i5VPM7WJy8QX3AfDJPn+y86GzsjxiQoeNBcvUeRwUoQ=; b=OwLVC44mlD5Q1qhL+d8Y/7ROid0I25+bOxRoDRoYqNLWsX4i5CWCn9ML /2mkwuBYUSH6TxanccwTrKcCNLJ6f1mysaaIQP7CPO376WixYASU0uUvX 7/4sFzuliY1d332HHpgRYSvwVPq3DayKfMvg5U3J8m+F0J7leENrUs8zJ I66xV4eIreZ+MLntiGc84ehOTmWvvqYSG+FMy7D75NqDBWt8GSp6aPmPW jynoYsf7Z4fD6vJanSCqwEd0DNGrz4xmADBVFFwo3ESsjEqZx2eiwDFYN ybxt/wQG3vX1Lv1psarS/D+OsTwVm+cdwEr4AjsSvWVGt/qtGLTwVLabs g==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="367858027" X-IronPort-AV: E=Sophos;i="6.03,196,1694761200"; d="scan'208";a="367858027" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 23:54:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="1081900928" X-IronPort-AV: E=Sophos;i="6.03,196,1694761200"; d="scan'208";a="1081900928" Received: from unknown (HELO fred..) ([172.25.112.68]) by fmsmga005.fm.intel.com with ESMTP; 02 Oct 2023 23:54:40 -0700 From: Xin Li To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org, linux-hyperv@vger.kernel.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, luto@kernel.org, pbonzini@redhat.com, seanjc@google.com, peterz@infradead.org, jgross@suse.com, ravi.v.shankar@intel.com, mhiramat@kernel.org, andrew.cooper3@citrix.com, jiangshanlai@gmail.com, nik.borisov@suse.com Subject: [PATCH v12 11/37] x86/opcode: Add ERET[US] instructions to the x86 opcode map Date: Mon, 2 Oct 2023 23:24:32 -0700 Message-Id: <20231003062458.23552-12-xin3.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231003062458.23552-1-xin3.li@intel.com> References: <20231003062458.23552-1-xin3.li@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 02 Oct 2023 23:55:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778716360191977408 X-GMAIL-MSGID: 1778716360191977408 From: "H. Peter Anvin (Intel)" ERETU returns from an event handler while making a transition to ring 3, and ERETS returns from an event handler while staying in ring 0. Add instruction opcodes used by ERET[US] to the x86 opcode map; opcode numbers are per FRED spec v5.0. Signed-off-by: H. Peter Anvin (Intel) Tested-by: Shan Kang Signed-off-by: Xin Li Reviewed-by: Masami Hiramatsu (Google) --- arch/x86/lib/x86-opcode-map.txt | 2 +- tools/arch/x86/lib/x86-opcode-map.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt index 1efe1d9bf5ce..12af572201a2 100644 --- a/arch/x86/lib/x86-opcode-map.txt +++ b/arch/x86/lib/x86-opcode-map.txt @@ -1052,7 +1052,7 @@ EndTable GrpTable: Grp7 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) | ERETU (F3),(010),(11B) | ERETS (F2),(010),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv diff --git a/tools/arch/x86/lib/x86-opcode-map.txt b/tools/arch/x86/lib/x86-opcode-map.txt index 1efe1d9bf5ce..12af572201a2 100644 --- a/tools/arch/x86/lib/x86-opcode-map.txt +++ b/tools/arch/x86/lib/x86-opcode-map.txt @@ -1052,7 +1052,7 @@ EndTable GrpTable: Grp7 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) | WRMSRNS (110),(11B) -1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) +1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) | ENCLS (111),(11B) | ERETU (F3),(010),(11B) | ERETS (F2),(010),(11B) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms 4: SMSW Mw/Rv