From patchwork Sat Sep 23 09:41:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Xin3" X-Patchwork-Id: 143931 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp237320vqu; Sat, 23 Sep 2023 08:23:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEyHvj4ucqKY23Dm1lcBHXHFV1QZL4gAN+BCuREhrqyWeQakSFnaKaBLSMNXGLGCpRe+7Y7 X-Received: by 2002:a17:902:b7cb:b0:1bd:ca80:6fe6 with SMTP id v11-20020a170902b7cb00b001bdca806fe6mr1608365plz.41.1695482592356; Sat, 23 Sep 2023 08:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695482592; cv=none; d=google.com; s=arc-20160816; b=RIM59BTPgtP/qsy0w4z93eE4toLvZ69gvr3crdZv6rpON9ZuNx4feaB3a+++Z2/2JE i2cm73/cItiw0rFp0yPB3MoX6nsyGT5PqqF8hnfWzDPX4gNKn4ka+6WeHGwwMVSEBozJ FhNZ1ZISTw1YYmIn9NcA+6AsVEKLegDWtPzZPmVnBIdavCzADDN/1lXgxT2NI+KJZWaE oFQfuV6kteWdSBqZ+gxP09HxxKYM7OWvW27A0VCKYRwOYWA2rPN3he1CRC+wFzQKbyUH FaevYLVDd68yPaOwwvpgQ7TL4lf8tSIL5dTqE4YVre8Tr3Ym76BkR5L6loRU8aPLbpJK AM0g== 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=LXbqdH8gWtoBhrb66it70sLCmNpcNVQi3CG1/rMatpY=; fh=Tb1p8S3iOxe/kX/WSNC3xEJzSVgGJ5DaxSrKb+pzH+4=; b=TgF+mJoORQ3IaOnLbcWk34YN4+j0QOHlHcPh8TX4XV5Gcrk6XUUyKjDmuaDs76r69O 3anIfWGwvumbRAx0akLXojiS1qaq2JQZFZQeQmvEhfxt6jbmW6MR2M14MhwgE4aTwhle Tzcaf68KHOluQnurDKrLj/0kh1NYoSY53mIo1oEp4lvUwcVhSyuumfBMEMmT1zxEaoVf yhq+0PTKI6EMlAR8RbbQSsPpYgOOiVrjlbFV73N6aB5tX7MxVcI84Wf3S0zf9zcaXRap 2piSvwsBOKacQbQBXPcco/YYlPcIeO6rZRZKfNPLZ8QW3y0swCVJwicLgoKrwLIotUu+ elGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BOWIf2Sp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id u17-20020a170903125100b001b89fd6bec4si6442709plh.144.2023.09.23.08.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 08:23:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BOWIf2Sp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 771D9839E81E; Sat, 23 Sep 2023 03:12:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231470AbjIWKL5 (ORCPT + 29 others); Sat, 23 Sep 2023 06:11:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231255AbjIWKLq (ORCPT ); Sat, 23 Sep 2023 06:11:46 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03E4919F; Sat, 23 Sep 2023 03:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695463900; x=1726999900; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MxQyQabDuj01hP6xHQ5mL2MlMceZ5LcTb8ReoP3KjJA=; b=BOWIf2SpfJr6iLdJd0Xqs9+FUlG3ec+F83l72YCiH9JMcu84LClq+cUi 6+6c8NJjDv8ueRmaKJaGAkV/hEiPUlhLAnIl2ya1fD6kpqmHjknkplnSb /iHUqJcFEYHQ6tD0ekdGDZ8wOrCBeZ3//wTmcgAfTbhTJSUyNy/wXNf51 gwuzOyzhmGCIk93VLAzRq4HqhXQhr6AsI8qfJHLo38LTSy/EGjQb2y5u5 tHlpQWouedRvEdW719IPdWJke1rxdSFLQwd9mEfCJFpnv/1pdM6PVbhvn YUfl+Yq0WRpmLHYxaUH1Uk6cbIdOsTN+TAimUDyOkgrPR/CwJYodzQy1h w==; X-IronPort-AV: E=McAfee;i="6600,9927,10841"; a="447492105" X-IronPort-AV: E=Sophos;i="6.03,171,1694761200"; d="scan'208";a="447492105" 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:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10841"; a="813388103" X-IronPort-AV: E=Sophos;i="6.03,171,1694761200"; d="scan'208";a="813388103" Received: from unknown (HELO fred..) ([172.25.112.68]) by fmsmga008.fm.intel.com with ESMTP; 23 Sep 2023 03:11:36 -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 02/37] x86/opcode: Add the WRMSRNS instruction to the x86 opcode map Date: Sat, 23 Sep 2023 02:41:37 -0700 Message-Id: <20230923094212.26520-3-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=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Sat, 23 Sep 2023 03:12:32 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777842355064597337 X-GMAIL-MSGID: 1777842355064597337 Add the opcode used by WRMSRNS, which is the non-serializing version of WRMSR and may replace it to improve performance, to the x86 opcode map. Tested-by: Shan Kang Signed-off-by: Xin Li Acked-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 5168ee0360b2..1efe1d9bf5ce 100644 --- a/arch/x86/lib/x86-opcode-map.txt +++ b/arch/x86/lib/x86-opcode-map.txt @@ -1051,7 +1051,7 @@ GrpTable: Grp6 EndTable GrpTable: Grp7 -0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) +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) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms diff --git a/tools/arch/x86/lib/x86-opcode-map.txt b/tools/arch/x86/lib/x86-opcode-map.txt index 5168ee0360b2..1efe1d9bf5ce 100644 --- a/tools/arch/x86/lib/x86-opcode-map.txt +++ b/tools/arch/x86/lib/x86-opcode-map.txt @@ -1051,7 +1051,7 @@ GrpTable: Grp6 EndTable GrpTable: Grp7 -0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | PCONFIG (101),(11B) | ENCLV (000),(11B) +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) 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) | ENCLU (111),(11B) 3: LIDT Ms