From patchwork Tue Dec 5 10:49:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Xin3" X-Patchwork-Id: 173976 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3358730vqy; Tue, 5 Dec 2023 03:21:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGT+bAJsz/2sKYF+xgET+FG2k39j3AhGhvhH6tmV9t6CXMsVZs5WaV83jctL+6H3u6Th7AC X-Received: by 2002:a05:6a20:2628:b0:18f:97c:4f59 with SMTP id i40-20020a056a20262800b0018f097c4f59mr2300592pze.101.1701775312022; Tue, 05 Dec 2023 03:21:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701775312; cv=none; d=google.com; s=arc-20160816; b=cAewT20Y3oK54nHvoy174fGxPu2ZHBdtjVU3bcwkpKT097ZZ7XgX4c2vIM6CtLhYge CYBFD11bM+1KHcxXR4IGKPYzeOZ9rw9qmgf82TA20LMaZfHzJsQK61JZBgoAZL9ZXDJR SElUtY/s7yo/d9aAPCe/SvM7BWmJCok5JHVi4e8cn05S6jHCx5lP0aj6r299xDGkbqzZ XwgC3lTYdZcypMaXUSD5jhsAVwHp41JRTD6ggZclbYER6KvFW+lPo5kqdjAROqtvBsLv WMpEMM8CBk5BYItgWfJg2IRpbHozFMmUsonv8RWMRpY+Sxg5qWnDBvOTvEj0ZHJC8RmT 6gCA== 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=cD0x7TgwJG2nCixAlx9FmxgCwSuAQ3rxFD56kdnwI9M=; fh=uCCWEUVpLc/xDP/D3WvGY/BxHU9d0NQYu/T71GEsNmA=; b=wS8PkB9OnUIePDHmSqxP/19NTzqvA2oFX8+LyXlVf8Sne4CNhheSQjbALpSrC0iVmn d61V2L72rGe5yroJH6KEyRkw4P2PyMyXzwlb3V9k3E1F0cRqSXk3SCDrTishvIreGCqB u/CPQNDpu/3e0J+u8OIV9zzvDV18EnZBzvMNmR2ddjbR0vtnHaNuh8pc1+aQbkE3Gm1y CkInfTnRcVABKd+0jAj+gX1NBAUPvi7mx2EuMK19P0bjxIo/RL1gDmYK46Ta0HeHarvR XAyPcmzO+HfeqJAxiXddGvs01/9OamfqGQ6G2puq/okvw23oWRYJ8WE/IDce+mbgTWsR 6PUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Vfpjlelj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f35-20020a631f23000000b005c688dc20ecsi3382677pgf.510.2023.12.05.03.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:21:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Vfpjlelj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id BD25880C0346; Tue, 5 Dec 2023 03:21:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442161AbjLELVk (ORCPT + 99 others); Tue, 5 Dec 2023 06:21:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442067AbjLELVR (ORCPT ); Tue, 5 Dec 2023 06:21:17 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B10889E; Tue, 5 Dec 2023 03:21:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701775284; x=1733311284; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fBLiRRcKVyAMRaXpDMNfuo7m3LN99KBaGmZAQi3QyEY=; b=VfpjleljAFWtaDLRDNNOdR2EpV1CMB3p/qdRTZr8HppEokE4vzfs742q w6GV1ksS641Eg9pNEBltx0tAxfzrezAQ5ZkHZYuqJ/vvI+0r2uobTJaUM 5S2kJFutEy8fAanJB3P83QNSBsXj20P85u6MCywvW5bM+csX7XA8LlPx4 b+cWfclQv3v4FKjxKD7UyJO2Xqv9obmpVtxRxhD+38rOcHX97XrneVxHH 1J4d5JsORbxDwUfbTM2ZiFb638KIjLxzvY7/+JIOqU/OCFDpzL/5HeivU QkefSoaLeNQ+vZoHhRK6fYZH6Bl0VQ4FwLgSUA6YQZ/G1KGjV5mFpm5Lr Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="942413" X-IronPort-AV: E=Sophos;i="6.04,252,1695711600"; d="scan'208";a="942413" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 03:21:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="1018192928" X-IronPort-AV: E=Sophos;i="6.04,252,1695711600"; d="scan'208";a="1018192928" Received: from unknown (HELO fred..) ([172.25.112.68]) by fmsmga006.fm.intel.com with ESMTP; 05 Dec 2023 03:21:18 -0800 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, shan.kang@intel.com Subject: [PATCH v13 09/35] x86/opcode: Add ERET[US] instructions to the x86 opcode map Date: Tue, 5 Dec 2023 02:49:58 -0800 Message-ID: <20231205105030.8698-10-xin3.li@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231205105030.8698-1-xin3.li@intel.com> References: <20231205105030.8698-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,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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 05 Dec 2023 03:21:51 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784440749640685723 X-GMAIL-MSGID: 1784440749640685723 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 Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Xin Li --- 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