Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1776328rdb; Mon, 2 Oct 2023 23:55:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqdluDv51KXF/bCVTyf0N6+usOXUxOk9q2w9StJ+NaUc12/434+VBOoO5m/Ec6CJ9HZpqa X-Received: by 2002:a05:6a00:1ac7:b0:682:537f:2cb8 with SMTP id f7-20020a056a001ac700b00682537f2cb8mr15219990pfv.26.1696316106771; Mon, 02 Oct 2023 23:55:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696316106; cv=none; d=google.com; s=arc-20160816; b=H4OAmoLmbHcHSC2dXfyYmcYwXV4qHENDiDt/M28l9LmDQDX+51E9wqzUVjPDI29cel 0V73b8C1fx7TP6hT89qkH22SlKfFxKq1kzLzm1OZ8jdK9tCWtijn7dO7C1Ly/tRH+7ME W2U2pcutXrwUsyYce+5SgPNYpk4fg5upYYAxQWu8HL5AyRgo+W6xPvtUmmQM/QovgPlW +0WQbD9dKcl/+CNR8IewZrZInDFEfqrjmhBwL+pEXJsIBAceWzmrweuuhvu1prnhW9kP StqzmMtqFFGKb9T+u2s6AyiED100zLboCvAB1BMJqafNOAwt5J3WT5nOxjlzuE8Px66Q 4bAA== 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.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 l125-20020a633e83000000b005859c221c6dsi874153pga.221.2023.10.02.23.55.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 23:55:06 -0700 (PDT) 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=OwLVC44m; 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 BDE3E812AD05; Mon, 2 Oct 2023 23:55:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239278AbjJCGzB (ORCPT + 99 others); Tue, 3 Oct 2023 02:55:01 -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 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 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]); Mon, 02 Oct 2023 23:55:06 -0700 (PDT) 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 -- 2.34.1