Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp209365rdb; Tue, 5 Dec 2023 03:21:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeWi+YQznaKujVj593dIic2R43NOXVwKyAghhG4CPN9KdC2Ej2s5SQkRQdsaMzd0gQHNBI X-Received: by 2002:a05:6a20:a18a:b0:18f:97c:4f6e with SMTP id r10-20020a056a20a18a00b0018f097c4f6emr2345817pzk.122.1701775313227; Tue, 05 Dec 2023 03:21:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701775313; cv=none; d=google.com; s=arc-20160816; b=Pz5dWDJ3+ivDBgRjmwTWwAUg8zxlO2kw/sEZYhWnaXbN85Xe+Jx1sCnXr+5Y59NASP 32yXOtAKkvgV8mtLj8ck04W1UyggOu+THg1TPE7Yb9s+iUKLUfm2Ecvc9gbLvaxBoH7V gOjHlupdXr66aVD+rLTA9oPT/YyPNJ/NiNQ0eEPNpWIbZNzdWrYRQkB4Yjep4QvuMzSs iZJX4pPGT96OTOTZ7gf69M9HND7k+mxnyhgPM1VEEv/kodsSELIvuCTY/A5Lc3CnMbX5 kb36nwdTtxyACcsAHgw66i9ezg3RbdyMXksbjlI692mL7OKyMre2AlvRyxyL/lSEEGu2 bLzA== 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 Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id p6-20020a170902b08600b001cfa9d9f585si9215344plr.369.2023.12.05.03.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 03:21:53 -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 AE40380C0377; Tue, 5 Dec 2023 03:21:51 -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 Content-Transfer-Encoding: 8bit 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) 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 -- 2.43.0