From patchwork Sat Sep 23 09:41:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Xin3" X-Patchwork-Id: 143997 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp357351vqu; Sat, 23 Sep 2023 13:28:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8kHeWUesEgf79te/zwTPVNbEItdGTkZkRlYPALsQ9edq+A3i+ry92g6IMj5lTlID777w2 X-Received: by 2002:a05:6870:84c4:b0:1d6:79e2:8484 with SMTP id l4-20020a05687084c400b001d679e28484mr3452376oak.22.1695500902810; Sat, 23 Sep 2023 13:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695500902; cv=none; d=google.com; s=arc-20160816; b=vwmzJvrqiD4uw5va6/eUQfsdRA+HJMcxnqVZQxK2RyW+dASenAuMgaNvl+oAXF5IXf 19Wcq35pCCbNtxnGhsDj5cRGAz6VNHaU5WMCsvxyqIoqbSJh5+yTA+2cR3wB5C/IDdgL Z8VG3NZblk387344/9ls1Wjg1ZFQj7sRElpjm2NgBiHZEMBmVjZCSy1frR4agIPsa9HL K/PX4W1mPTg9uoRX1OqUauGAZiZEaU6HPisBrzAUQy1rVACB4ZNmGmMxvUvTRJQ4zacI FIvrRVUL62Rk9WTqkcZ5yQFxxUSdzP6UC8lDHJ6cLv9fACkhGYSR4AjOXHUnsD0e5akE OloQ== 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=sJ8SLB1E8QPVZNgKoAZnOx1sFmC1Z4gP32k0GEeXMxwUJaQ6ojBX/TZaQYgLu2UNtC Pm9pgBOEEE1bN8CPfJ8xccBOBHnainMeBL1Qyqpcn5oLEU6ui1AHucSTk6Lo90XXidq1 OjrreO12F+fME59BU0rNrrvVYvh3MD4kN8IsAkpaBUmF3tRtP97xy85fCgBUuzMXtNNY BXJEDj6pa86yd6XlYvU+ARwiWMVzclY9Weq8CiVj2y8s6k3mYqz9h+4+UjA0IAJktCIp oni4lYQ985XO4M1i4YqLo228oK8P8TxyprF0qhyWh9aWP1HMmzh+ljY/PQoMfbzitZvq tbJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FYjF932O; 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 f20-20020a63f114000000b00580e32f7793si827914pgi.151.2023.09.23.13.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 13:28:22 -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=FYjF932O; 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 D9F3F8270044; Sat, 23 Sep 2023 03:12:23 -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 S231452AbjIWKMM (ORCPT + 29 others); Sat, 23 Sep 2023 06:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231359AbjIWKLt (ORCPT ); Sat, 23 Sep 2023 06:11:49 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 652D41AC; Sat, 23 Sep 2023 03:11: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=1695463903; x=1726999903; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=i5VPM7WJy8QX3AfDJPn+y86GzsjxiQoeNBcvUeRwUoQ=; b=FYjF932OR3QHVgfDGDjrHpWKp6BPvvFE4shW/ZL0c6mzKJnNx3j1bovH sH4P9qQpID6cNHh3/ScpiyBELF+i+IT+PnaOaZD/hJfFCZLYSbmNMKjeZ JdUxuBG5sJk+5KRno0fMy3uOXtAjplMdBwRUX5JRixrDDVX3DDrUZpUM1 LaQ/CCrXHPkUOfbFkNoYoh6eADORM36mm5Da8LXHAYujo446dKPE80JEu /44JftvUgLP6lGBu7ZZfa5TTF7bdOmw9fCEUSWG6EynnyixzSorOyp7eq tpAgwBsNDwIqyYcddPnz4+I0eYqeB5yCMzpCasNMXBha0P8y9vY6h47Nx g==; X-IronPort-AV: E=McAfee;i="6600,9927,10841"; a="447492203" X-IronPort-AV: E=Sophos;i="6.03,171,1694761200"; d="scan'208";a="447492203" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2023 03:11:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10841"; a="813388138" X-IronPort-AV: E=Sophos;i="6.03,171,1694761200"; d="scan'208";a="813388138" Received: from unknown (HELO fred..) ([172.25.112.68]) by fmsmga008.fm.intel.com with ESMTP; 23 Sep 2023 03:11:41 -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 v11 11/37] x86/opcode: Add ERET[US] instructions to the x86 opcode map Date: Sat, 23 Sep 2023 02:41:46 -0700 Message-Id: <20230923094212.26520-12-xin3.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230923094212.26520-1-xin3.li@intel.com> References: <20230923094212.26520-1-xin3.li@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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]); Sat, 23 Sep 2023 03:12:23 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777861554440247418 X-GMAIL-MSGID: 1777861554440247418 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