|
|
b38b0f |
From 0a8e2990b83c805fc6cc2421950a938caa9ba8a5 Mon Sep 17 00:00:00 2001
|
|
|
b38b0f |
From: "plai@redhat.com" <plai@redhat.com>
|
|
|
b38b0f |
Date: Wed, 3 Apr 2019 15:54:29 +0100
|
|
|
b38b0f |
Subject: [PATCH 05/10] i386: Add new CPU model Icelake-{Server, Client}
|
|
|
b38b0f |
|
|
|
b38b0f |
RH-Author: plai@redhat.com
|
|
|
b38b0f |
Message-id: <1554306874-28796-6-git-send-email-plai@redhat.com>
|
|
|
b38b0f |
Patchwork-id: 85383
|
|
|
b38b0f |
O-Subject: [RHEL8.1 qemu-kvm PATCH resend 05/10] i386: Add new CPU model Icelake-{Server, Client}
|
|
|
b38b0f |
Bugzilla: 1561761
|
|
|
b38b0f |
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
b38b0f |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
b38b0f |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
b38b0f |
|
|
|
b38b0f |
From: Robert Hoo <robert.hu@linux.intel.com>
|
|
|
b38b0f |
|
|
|
b38b0f |
New CPU models mostly inherit features from ancestor Skylake, while addin new
|
|
|
b38b0f |
features: UMIP, New Instructions ( PCONIFIG (server only), WBNOINVD,
|
|
|
b38b0f |
AVX512_VBMI2, GFNI, AVX512_VNNI, VPCLMULQDQ, VAES, AVX512_BITALG),
|
|
|
b38b0f |
Intel PT and 5-level paging (Server only). As well as
|
|
|
b38b0f |
IA32_PRED_CMD, SSBD support for speculative execution
|
|
|
b38b0f |
side channel mitigations.
|
|
|
b38b0f |
|
|
|
b38b0f |
Note:
|
|
|
b38b0f |
For 5-level paging, Guest physical address width can be configured, with
|
|
|
b38b0f |
parameter "phys-bits". Unless explicitly specified, we still use its default
|
|
|
b38b0f |
value, even for Icelake-Server cpu model.
|
|
|
b38b0f |
At present, hold on expose IA32_ARCH_CAPABILITIES to guest, as 1) This MSR
|
|
|
b38b0f |
actually presents more than 1 'feature', maintainers are considering expanding current
|
|
|
b38b0f |
features presentation of only CPUIDs to MSR bits; 2) a reasonable default value
|
|
|
b38b0f |
for MSR_IA32_ARCH_CAPABILITIES needs to settled first. These 2 are actully
|
|
|
b38b0f |
beyond Icelake CPU model itself but fundamental. So split these work apart
|
|
|
b38b0f |
and do it later.
|
|
|
b38b0f |
https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg00774.html
|
|
|
b38b0f |
https://lists.gnu.org/archive/html/qemu-devel/2018-07/msg00796.html
|
|
|
b38b0f |
|
|
|
b38b0f |
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
|
|
|
b38b0f |
Message-Id: <1530781798-183214-6-git-send-email-robert.hu@linux.intel.com>
|
|
|
b38b0f |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
b38b0f |
(cherry picked from commit 8a11c62da9146dd89aee98947e6bd831e65a970d)
|
|
|
b38b0f |
Signed-off-by: Paul Lai <plai@redhat.com>
|
|
|
b38b0f |
|
|
|
b38b0f |
Resovled Conflicts:
|
|
|
b38b0f |
target/i386/cpu.c
|
|
|
b38b0f |
|
|
|
b38b0f |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
b38b0f |
---
|
|
|
b38b0f |
target/i386/cpu.c | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
b38b0f |
1 file changed, 115 insertions(+)
|
|
|
b38b0f |
|
|
|
b38b0f |
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
|
|
|
b38b0f |
index 8b9a9f6..d86b744 100644
|
|
|
b38b0f |
--- a/target/i386/cpu.c
|
|
|
b38b0f |
+++ b/target/i386/cpu.c
|
|
|
b38b0f |
@@ -2414,6 +2414,121 @@ static X86CPUDefinition builtin_x86_defs[] = {
|
|
|
b38b0f |
.model_id = "Intel Xeon Processor (Skylake, IBRS)",
|
|
|
b38b0f |
},
|
|
|
b38b0f |
{
|
|
|
b38b0f |
+ .name = "Icelake-Client",
|
|
|
b38b0f |
+ .level = 0xd,
|
|
|
b38b0f |
+ .vendor = CPUID_VENDOR_INTEL,
|
|
|
b38b0f |
+ .family = 6,
|
|
|
b38b0f |
+ .model = 126,
|
|
|
b38b0f |
+ .stepping = 0,
|
|
|
b38b0f |
+ .features[FEAT_1_EDX] =
|
|
|
b38b0f |
+ CPUID_VME | CPUID_SSE2 | CPUID_SSE | CPUID_FXSR | CPUID_MMX |
|
|
|
b38b0f |
+ CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV | CPUID_MCA |
|
|
|
b38b0f |
+ CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC | CPUID_CX8 |
|
|
|
b38b0f |
+ CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC | CPUID_PSE |
|
|
|
b38b0f |
+ CPUID_DE | CPUID_FP87,
|
|
|
b38b0f |
+ .features[FEAT_1_ECX] =
|
|
|
b38b0f |
+ CPUID_EXT_AVX | CPUID_EXT_XSAVE | CPUID_EXT_AES |
|
|
|
b38b0f |
+ CPUID_EXT_POPCNT | CPUID_EXT_X2APIC | CPUID_EXT_SSE42 |
|
|
|
b38b0f |
+ CPUID_EXT_SSE41 | CPUID_EXT_CX16 | CPUID_EXT_SSSE3 |
|
|
|
b38b0f |
+ CPUID_EXT_PCLMULQDQ | CPUID_EXT_SSE3 |
|
|
|
b38b0f |
+ CPUID_EXT_TSC_DEADLINE_TIMER | CPUID_EXT_FMA | CPUID_EXT_MOVBE |
|
|
|
b38b0f |
+ CPUID_EXT_PCID | CPUID_EXT_F16C | CPUID_EXT_RDRAND,
|
|
|
b38b0f |
+ .features[FEAT_8000_0001_EDX] =
|
|
|
b38b0f |
+ CPUID_EXT2_LM | CPUID_EXT2_RDTSCP | CPUID_EXT2_NX |
|
|
|
b38b0f |
+ CPUID_EXT2_SYSCALL,
|
|
|
b38b0f |
+ .features[FEAT_8000_0001_ECX] =
|
|
|
b38b0f |
+ CPUID_EXT3_ABM | CPUID_EXT3_LAHF_LM | CPUID_EXT3_3DNOWPREFETCH,
|
|
|
b38b0f |
+ .features[FEAT_8000_0008_EBX] =
|
|
|
b38b0f |
+ CPUID_8000_0008_EBX_WBNOINVD,
|
|
|
b38b0f |
+ .features[FEAT_7_0_EBX] =
|
|
|
b38b0f |
+ CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_MPX | CPUID_7_0_EBX_INTEL_PT,
|
|
|
b38b0f |
+ .features[FEAT_7_0_ECX] =
|
|
|
b38b0f |
+ CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
|
|
|
b38b0f |
+ CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
|
|
|
b38b0f |
+ CPUID_7_0_ECX_VAES | CPUID_7_0_ECX_VPCLMULQDQ |
|
|
|
b38b0f |
+ CPUID_7_0_ECX_AVX512VNNI | CPUID_7_0_ECX_AVX512BITALG |
|
|
|
b38b0f |
+ CPUID_7_0_ECX_AVX512_VPOPCNTDQ,
|
|
|
b38b0f |
+ .features[FEAT_7_0_EDX] =
|
|
|
b38b0f |
+ CPUID_7_0_EDX_SPEC_CTRL | CPUID_7_0_EDX_SPEC_CTRL_SSBD,
|
|
|
b38b0f |
+ /* Missing: XSAVES (not supported by some Linux versions,
|
|
|
b38b0f |
+ * including v4.1 to v4.12).
|
|
|
b38b0f |
+ * KVM doesn't yet expose any XSAVES state save component,
|
|
|
b38b0f |
+ * and the only one defined in Skylake (processor tracing)
|
|
|
b38b0f |
+ * probably will block migration anyway.
|
|
|
b38b0f |
+ */
|
|
|
b38b0f |
+ .features[FEAT_XSAVE] =
|
|
|
b38b0f |
+ CPUID_XSAVE_XSAVEOPT | CPUID_XSAVE_XSAVEC |
|
|
|
b38b0f |
+ CPUID_XSAVE_XGETBV1,
|
|
|
b38b0f |
+ .features[FEAT_6_EAX] =
|
|
|
b38b0f |
+ CPUID_6_EAX_ARAT,
|
|
|
b38b0f |
+ .xlevel = 0x80000008,
|
|
|
b38b0f |
+ .model_id = "Intel Core Processor (Icelake)",
|
|
|
b38b0f |
+ },
|
|
|
b38b0f |
+ {
|
|
|
b38b0f |
+ .name = "Icelake-Server",
|
|
|
b38b0f |
+ .level = 0xd,
|
|
|
b38b0f |
+ .vendor = CPUID_VENDOR_INTEL,
|
|
|
b38b0f |
+ .family = 6,
|
|
|
b38b0f |
+ .model = 134,
|
|
|
b38b0f |
+ .stepping = 0,
|
|
|
b38b0f |
+ .features[FEAT_1_EDX] =
|
|
|
b38b0f |
+ CPUID_VME | CPUID_SSE2 | CPUID_SSE | CPUID_FXSR | CPUID_MMX |
|
|
|
b38b0f |
+ CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV | CPUID_MCA |
|
|
|
b38b0f |
+ CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC | CPUID_CX8 |
|
|
|
b38b0f |
+ CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC | CPUID_PSE |
|
|
|
b38b0f |
+ CPUID_DE | CPUID_FP87,
|
|
|
b38b0f |
+ .features[FEAT_1_ECX] =
|
|
|
b38b0f |
+ CPUID_EXT_AVX | CPUID_EXT_XSAVE | CPUID_EXT_AES |
|
|
|
b38b0f |
+ CPUID_EXT_POPCNT | CPUID_EXT_X2APIC | CPUID_EXT_SSE42 |
|
|
|
b38b0f |
+ CPUID_EXT_SSE41 | CPUID_EXT_CX16 | CPUID_EXT_SSSE3 |
|
|
|
b38b0f |
+ CPUID_EXT_PCLMULQDQ | CPUID_EXT_SSE3 |
|
|
|
b38b0f |
+ CPUID_EXT_TSC_DEADLINE_TIMER | CPUID_EXT_FMA | CPUID_EXT_MOVBE |
|
|
|
b38b0f |
+ CPUID_EXT_PCID | CPUID_EXT_F16C | CPUID_EXT_RDRAND,
|
|
|
b38b0f |
+ .features[FEAT_8000_0001_EDX] =
|
|
|
b38b0f |
+ CPUID_EXT2_LM | CPUID_EXT2_PDPE1GB | CPUID_EXT2_RDTSCP |
|
|
|
b38b0f |
+ CPUID_EXT2_NX | CPUID_EXT2_SYSCALL,
|
|
|
b38b0f |
+ .features[FEAT_8000_0001_ECX] =
|
|
|
b38b0f |
+ CPUID_EXT3_ABM | CPUID_EXT3_LAHF_LM | CPUID_EXT3_3DNOWPREFETCH,
|
|
|
b38b0f |
+ .features[FEAT_8000_0008_EBX] =
|
|
|
b38b0f |
+ CPUID_8000_0008_EBX_WBNOINVD,
|
|
|
b38b0f |
+ .features[FEAT_7_0_EBX] =
|
|
|
b38b0f |
+ CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_MPX | CPUID_7_0_EBX_CLWB |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
|
|
|
b38b0f |
+ CPUID_7_0_EBX_INTEL_PT,
|
|
|
b38b0f |
+ .features[FEAT_7_0_ECX] =
|
|
|
b38b0f |
+ CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
|
|
|
b38b0f |
+ CPUID_7_0_ECX_OSPKE | CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
|
|
|
b38b0f |
+ CPUID_7_0_ECX_VAES | CPUID_7_0_ECX_VPCLMULQDQ |
|
|
|
b38b0f |
+ CPUID_7_0_ECX_AVX512VNNI | CPUID_7_0_ECX_AVX512BITALG |
|
|
|
b38b0f |
+ CPUID_7_0_ECX_AVX512_VPOPCNTDQ | CPUID_7_0_ECX_LA57,
|
|
|
b38b0f |
+ .features[FEAT_7_0_EDX] =
|
|
|
b38b0f |
+ CPUID_7_0_EDX_PCONFIG | CPUID_7_0_EDX_SPEC_CTRL |
|
|
|
b38b0f |
+ CPUID_7_0_EDX_SPEC_CTRL_SSBD,
|
|
|
b38b0f |
+ /* Missing: XSAVES (not supported by some Linux versions,
|
|
|
b38b0f |
+ * including v4.1 to v4.12).
|
|
|
b38b0f |
+ * KVM doesn't yet expose any XSAVES state save component,
|
|
|
b38b0f |
+ * and the only one defined in Skylake (processor tracing)
|
|
|
b38b0f |
+ * probably will block migration anyway.
|
|
|
b38b0f |
+ */
|
|
|
b38b0f |
+ .features[FEAT_XSAVE] =
|
|
|
b38b0f |
+ CPUID_XSAVE_XSAVEOPT | CPUID_XSAVE_XSAVEC |
|
|
|
b38b0f |
+ CPUID_XSAVE_XGETBV1,
|
|
|
b38b0f |
+ .features[FEAT_6_EAX] =
|
|
|
b38b0f |
+ CPUID_6_EAX_ARAT,
|
|
|
b38b0f |
+ .xlevel = 0x80000008,
|
|
|
b38b0f |
+ .model_id = "Intel Xeon Processor (Icelake)",
|
|
|
b38b0f |
+ },
|
|
|
b38b0f |
+ {
|
|
|
b38b0f |
.name = "Opteron_G1",
|
|
|
b38b0f |
.level = 5,
|
|
|
b38b0f |
.vendor = CPUID_VENDOR_AMD,
|
|
|
b38b0f |
--
|
|
|
b38b0f |
1.8.3.1
|
|
|
b38b0f |
|