From nobody Mon May 13 14:50:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1594716094; cv=none; d=zohomail.com; s=zohoarc; b=l7mrmWdpUBaQ+461ykpf6S3BrXqPnx7RKwE9k+/l+F5/CeUcUaWmCHY3YE9EVQYjtqlmwGASDuCz4A1zw+olC+gGxyxQuFbVgA6j25nYkVncdJyTZX5sGkVnLTgkzuPFLRngFD9jyFddijGANGWUQxQkJ+/A3iKqT0PEAWpvGKg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594716094; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=HYOg7pk1mh/gO5Cek0RRbD9kmGiT0gc60G456GWlBSg=; b=Y33kbZwKial1P2iUiw4MzFJ2yfjtJkNm2OnRrAOIJj1oEhNkwfIR7XPsXZrmx5nsKVgDIXKC28LqiJzqo58jNPdnwQb7uAI3ynq18NNdCYFpKPABknjwphcv84deOyRifJFE7sn+R+SSH/pKaC/0UCjMPunD/UBTJ+8R3YfuaYU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1594716094910333.16266807039153; Tue, 14 Jul 2020 01:41:34 -0700 (PDT) Received: from localhost ([::1]:60968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvGVJ-0000zw-H9 for importer@patchew.org; Tue, 14 Jul 2020 04:41:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvGU1-0007jI-HP for qemu-devel@nongnu.org; Tue, 14 Jul 2020 04:40:13 -0400 Received: from mga12.intel.com ([192.55.52.136]:43778) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvGTy-0002ZH-Ki for qemu-devel@nongnu.org; Tue, 14 Jul 2020 04:40:13 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2020 01:40:07 -0700 Received: from chenyi-pc.sh.intel.com ([10.239.159.72]) by orsmga002.jf.intel.com with ESMTP; 14 Jul 2020 01:40:06 -0700 IronPort-SDR: xBkMvAj/v2Lfzt49MBYZN1rSC6Z9Wb3D9K1K2yNs+QSnWrtuU2WeSTrU5W6RD9h2gV5L+AiU1j tD5J/1U/mQZA== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="128407132" X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="128407132" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False IronPort-SDR: XdSkIQCDl8e0uvczau/C+Tn+6Yba+KCvbcwgI4+ZCY44tE4ba4gAC8AvMgAnJqavbBd1gcgVBr 7oaTQEA9YWFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="299464832" From: Chenyi Qiang To: Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH v6 1/3] target/i386: add fast short REP MOV support Date: Tue, 14 Jul 2020 16:41:46 +0800 Message-Id: <20200714084148.26690-2-chenyi.qiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200714084148.26690-1-chenyi.qiang@intel.com> References: <20200714084148.26690-1-chenyi.qiang@intel.com> Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.55.52.136; envelope-from=chenyi.qiang@intel.com; helo=mga12.intel.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/14 04:40:06 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xiaoyao Li , qemu-devel@nongnu.org, Robert Hoo Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" For CPUs support fast short REP MOV[CPUID.(EAX=3D7,ECX=3D0):EDX(bit4)], e.g Icelake and Tigerlake, expose it to the guest VM. Reviewed-by: Eduardo Habkost Signed-off-by: Chenyi Qiang --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 1e5123251d..55e063babe 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -984,7 +984,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS]= =3D { .type =3D CPUID_FEATURE_WORD, .feat_names =3D { NULL, NULL, "avx512-4vnniw", "avx512-4fmaps", - NULL, NULL, NULL, NULL, + "fsrm", NULL, NULL, NULL, "avx512-vp2intersect", NULL, "md-clear", NULL, NULL, NULL, "serialize", NULL, "tsx-ldtrk", NULL, NULL /* pconfig */, NULL, diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 37fffa5cac..e1a5c174dc 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -775,6 +775,8 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS]; #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Multiply Accumulation Single Precision */ #define CPUID_7_0_EDX_AVX512_4FMAPS (1U << 3) +/* Fast Short Rep Mov */ +#define CPUID_7_0_EDX_FSRM (1U << 4) /* AVX512 Vector Pair Intersection to a Pair of Mask Registers */ #define CPUID_7_0_EDX_AVX512_VP2INTERSECT (1U << 8) /* SERIALIZE instruction */ --=20 2.17.1 From nobody Mon May 13 14:50:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1594716163; cv=none; d=zohomail.com; s=zohoarc; b=dwB1u92q7+ngmvIFCd4YVAo+AZVzebPcjQCy2ffsPGm80l+Ay8tCS90RzG30YyHSrvcLz4Sbs/uUEPyEdPZI05rwKbiOa1tmss95watohfxdFJsp1U1E2gaApWJp4dHK7MJDAze6xXpBbR2HBpD1ZUh8LUJl2rjQ4oRi/5sbOqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594716163; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=u2pIn5nGNCRm/4qxmH4wgLks5kaH4YKdW9boQEupjTQ=; b=KsgLXuvdXSsLDQfO512P8Mb1+C+NvsYNK4KHhnxD7/0mIOlyPKmhYfxh/9iu144fn+3wyA5y7tvFLdpDgXxJBE8UMtb0dU9tfdzBlNLbCn13kgPL9TRcUox9QsSCTRt5YQUbYrcnGTs22OjE8JxoSJ9c4Ozsoe3s4952UbuBQd0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1594716163769330.84441970141904; Tue, 14 Jul 2020 01:42:43 -0700 (PDT) Received: from localhost ([::1]:38914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvGWQ-0003Uf-F6 for importer@patchew.org; Tue, 14 Jul 2020 04:42:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvGU3-0007mT-FC for qemu-devel@nongnu.org; Tue, 14 Jul 2020 04:40:15 -0400 Received: from mga12.intel.com ([192.55.52.136]:43779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvGTz-0002ZL-DJ for qemu-devel@nongnu.org; Tue, 14 Jul 2020 04:40:15 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2020 01:40:10 -0700 Received: from chenyi-pc.sh.intel.com ([10.239.159.72]) by orsmga002.jf.intel.com with ESMTP; 14 Jul 2020 01:40:08 -0700 IronPort-SDR: PFPqKxIJbo8+Nt7Y9j5pD4sHmx7ImIbhcGCFqoVqAwVSYiPRW7C5YA2g5W1OrZooMlRew1I8VR sWwdJHSsV5xQ== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="128407139" X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="128407139" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False IronPort-SDR: tbMOYftRXr70ITZnjJYrGMCyEzeLo5t2VnsnAQnGoljP5Pty/072IK88UEEaoLYU8MbRWwKCUh DSUL2TDnSgIw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="299464851" From: Chenyi Qiang To: Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH v6 2/3] target/i386: fix model number and add missing features for Icelake-Server CPU model Date: Tue, 14 Jul 2020 16:41:47 +0800 Message-Id: <20200714084148.26690-3-chenyi.qiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200714084148.26690-1-chenyi.qiang@intel.com> References: <20200714084148.26690-1-chenyi.qiang@intel.com> Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.55.52.136; envelope-from=chenyi.qiang@intel.com; helo=mga12.intel.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/14 04:40:06 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xiaoyao Li , qemu-devel@nongnu.org, Robert Hoo Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add the missing features(sha_ni, avx512ifma, rdpid, fsrm, vmx-rdseed-exit, vmx-pml, vmx-eptp-switching) and change the model number to 106 in the Icelake-Server-v4 CPU model. Signed-off-by: Chenyi Qiang --- target/i386/cpu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 55e063babe..6afc59d8ff 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3512,6 +3512,20 @@ static X86CPUDefinition builtin_x86_defs[] =3D { { /* end of list */ } }, }, + { + .version =3D 4, + .props =3D (PropValue[]) { + { "sha-ni", "on" }, + { "avx512ifma", "on" }, + { "rdpid", "on" }, + { "fsrm", "on" }, + { "vmx-rdseed-exit", "on" }, + { "vmx-pml", "on" }, + { "vmx-eptp-switching", "on" }, + { "model", "106" }, + { /* end of list */ } + }, + }, { /* end of list */ } } }, --=20 2.17.1 From nobody Mon May 13 14:50:25 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1594716121; cv=none; d=zohomail.com; s=zohoarc; b=WZuqbRSeYgbe5E/Ab6TG65MOcX+WtzFIQy1isx+ysz7AIu11XQ9eajsFLfV/td1x9OtYiOXWGsHa49Mub060+virhP+QMEOLucleEjzlvcHyI0EShBp6Dd9hOVYaJHENQDXYdnO2ZsoMlGPQkeUmdTrH9+UeN9JEErTUk5u4gNc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594716121; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=CrHGQjWFv70/Ep4yLNRWEYa91AzAJnZyR66EOlsWW3c=; b=mqqRbu/VgeCyvVEpNbJRvI6JKbFAOdrfVSHH/oQDflLjKZM+/u/JA1YrvAFU2hpNSv2AeEsr9s9pkTUg/2VKXmbx/HkgJSuHAMMoWSh6YN9a3+b3ob+G3toPCtaJFcNltpx5g/CxKGwPHp8jI7dJZRgLVVgcdTjEABBO7qodfSY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1594716121068299.5987728695052; Tue, 14 Jul 2020 01:42:01 -0700 (PDT) Received: from localhost ([::1]:35640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvGVj-0002BT-SN for importer@patchew.org; Tue, 14 Jul 2020 04:41:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvGU3-0007nH-T5 for qemu-devel@nongnu.org; Tue, 14 Jul 2020 04:40:15 -0400 Received: from mga12.intel.com ([192.55.52.136]:43778) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvGU1-0002ZH-K5 for qemu-devel@nongnu.org; Tue, 14 Jul 2020 04:40:15 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2020 01:40:12 -0700 Received: from chenyi-pc.sh.intel.com ([10.239.159.72]) by orsmga002.jf.intel.com with ESMTP; 14 Jul 2020 01:40:10 -0700 IronPort-SDR: TEURLu353O9g1NW+qIcOag0knlVN7n5aaj4Vm1Lsc/97toHS64BgD2DT9cBpyRzqYLsPulp6Qz Xig5lUJQrMeA== X-IronPort-AV: E=McAfee;i="6000,8403,9681"; a="128407142" X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="128407142" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False IronPort-SDR: CGFfTRrSRttfzqVi1U/srNkBdpgz/52MYZbGUIUWAwK4O+XZxqRrpn6GIJsX7seRyh/GXHMrtR 7kn9I3yIwOjg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,350,1589266800"; d="scan'208";a="299464867" From: Chenyi Qiang To: Paolo Bonzini , Richard Henderson , Eduardo Habkost Subject: [PATCH v6 3/3] target/i386: add the missing vmx features for Skylake-Server and Cascadelake-Server CPU models Date: Tue, 14 Jul 2020 16:41:48 +0800 Message-Id: <20200714084148.26690-4-chenyi.qiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200714084148.26690-1-chenyi.qiang@intel.com> References: <20200714084148.26690-1-chenyi.qiang@intel.com> Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.55.52.136; envelope-from=chenyi.qiang@intel.com; helo=mga12.intel.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/14 04:40:06 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xiaoyao Li , qemu-devel@nongnu.org, Robert Hoo Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add the missing vmx features in Skylake-Server and Cascadelake-Server CPU models based on the output of Paolo's script. Signed-off-by: Chenyi Qiang --- target/i386/cpu.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 6afc59d8ff..1dca1713bd 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -3034,6 +3034,13 @@ static X86CPUDefinition builtin_x86_defs[] =3D { { /* end of list */ } } }, + { + .version =3D 4, + .props =3D (PropValue[]) { + { "vmx-eptp-switching", "on" }, + { /* end of list */ } + } + }, { /* end of list */ } } }, @@ -3158,6 +3165,13 @@ static X86CPUDefinition builtin_x86_defs[] =3D { { /* end of list */ } }, }, + { .version =3D 4, + .note =3D "ARCH_CAPABILITIES, no TSX", + .props =3D (PropValue[]) { + { "vmx-eptp-switching", "on" }, + { /* end of list */ } + }, + }, { /* end of list */ } } }, --=20 2.17.1