Pablo Greco e6a3ae
From 2d44f02611fcb0eddad08d2c5d4361d568fcfd67 Mon Sep 17 00:00:00 2001
Pablo Greco e6a3ae
From: "plai@redhat.com" <plai@redhat.com>
Pablo Greco e6a3ae
Date: Mon, 1 Jul 2019 16:17:30 +0100
Pablo Greco e6a3ae
Subject: [PATCH 01/39] i386: Add new model of Cascadelake-Server
Pablo Greco e6a3ae
Pablo Greco e6a3ae
RH-Author: plai@redhat.com
Pablo Greco e6a3ae
Message-id: <1561997854-9646-2-git-send-email-plai@redhat.com>
Pablo Greco e6a3ae
Patchwork-id: 89331
Pablo Greco e6a3ae
O-Subject: [RHEL8.1 qemu-kvm PATCH v6 1/5] i386: Add new model of Cascadelake-Server
Pablo Greco e6a3ae
Bugzilla: 1629906
Pablo Greco e6a3ae
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Pablo Greco e6a3ae
RH-Acked-by: Bandan Das <bsd@redhat.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
From: Tao Xu <tao3.xu@intel.com>
Pablo Greco e6a3ae
Pablo Greco e6a3ae
New CPU models mostly inherit features from ancestor Skylake-Server,
Pablo Greco e6a3ae
while addin new features: AVX512_VNNI, Intel PT.
Pablo Greco e6a3ae
SSBD support for speculative execution
Pablo Greco e6a3ae
side channel mitigations.
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Note:
Pablo Greco e6a3ae
Pablo Greco e6a3ae
On Cascadelake, some capabilities (RDCL_NO, IBRS_ALL, RSBA,
Pablo Greco e6a3ae
SKIP_L1DFL_VMENTRY and SSB_NO) are enumerated by MSR.
Pablo Greco e6a3ae
These features rely on MSR based feature support patch.
Pablo Greco e6a3ae
Will be added later after that patch's in.
Pablo Greco e6a3ae
http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg00074.html
Pablo Greco e6a3ae
Pablo Greco e6a3ae
Signed-off-by: Tao Xu <tao3.xu@intel.com>
Pablo Greco e6a3ae
Message-Id: <20180919031122.28487-2-tao3.xu@intel.com>
Pablo Greco e6a3ae
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Pablo Greco e6a3ae
(cherry picked from commit c7a88b52f62b30c04158eeb07f73e3f72221b6a8)
Pablo Greco e6a3ae
Signed-off-by: Paul Lai <plai@redhat.com>
Pablo Greco e6a3ae
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
Pablo Greco e6a3ae
---
Pablo Greco e6a3ae
 target/i386/cpu.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
Pablo Greco e6a3ae
 1 file changed, 54 insertions(+)
Pablo Greco e6a3ae
Pablo Greco e6a3ae
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
Pablo Greco e6a3ae
index 5c10093..9ba5288 100644
Pablo Greco e6a3ae
--- a/target/i386/cpu.c
Pablo Greco e6a3ae
+++ b/target/i386/cpu.c
Pablo Greco e6a3ae
@@ -2483,6 +2483,60 @@ static X86CPUDefinition builtin_x86_defs[] = {
Pablo Greco e6a3ae
         .model_id = "Intel Xeon Processor (Skylake, IBRS)",
Pablo Greco e6a3ae
     },
Pablo Greco e6a3ae
     {
Pablo Greco e6a3ae
+        .name = "Cascadelake-Server",
Pablo Greco e6a3ae
+        .level = 0xd,
Pablo Greco e6a3ae
+        .vendor = CPUID_VENDOR_INTEL,
Pablo Greco e6a3ae
+        .family = 6,
Pablo Greco e6a3ae
+        .model = 85,
Pablo Greco e6a3ae
+        .stepping = 5,
Pablo Greco e6a3ae
+        .features[FEAT_1_EDX] =
Pablo Greco e6a3ae
+            CPUID_VME | CPUID_SSE2 | CPUID_SSE | CPUID_FXSR | CPUID_MMX |
Pablo Greco e6a3ae
+            CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV | CPUID_MCA |
Pablo Greco e6a3ae
+            CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC | CPUID_CX8 |
Pablo Greco e6a3ae
+            CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC | CPUID_PSE |
Pablo Greco e6a3ae
+            CPUID_DE | CPUID_FP87,
Pablo Greco e6a3ae
+        .features[FEAT_1_ECX] =
Pablo Greco e6a3ae
+            CPUID_EXT_AVX | CPUID_EXT_XSAVE | CPUID_EXT_AES |
Pablo Greco e6a3ae
+            CPUID_EXT_POPCNT | CPUID_EXT_X2APIC | CPUID_EXT_SSE42 |
Pablo Greco e6a3ae
+            CPUID_EXT_SSE41 | CPUID_EXT_CX16 | CPUID_EXT_SSSE3 |
Pablo Greco e6a3ae
+            CPUID_EXT_PCLMULQDQ | CPUID_EXT_SSE3 |
Pablo Greco e6a3ae
+            CPUID_EXT_TSC_DEADLINE_TIMER | CPUID_EXT_FMA | CPUID_EXT_MOVBE |
Pablo Greco e6a3ae
+            CPUID_EXT_PCID | CPUID_EXT_F16C | CPUID_EXT_RDRAND,
Pablo Greco e6a3ae
+        .features[FEAT_8000_0001_EDX] =
Pablo Greco e6a3ae
+            CPUID_EXT2_LM | CPUID_EXT2_PDPE1GB | CPUID_EXT2_RDTSCP |
Pablo Greco e6a3ae
+            CPUID_EXT2_NX | CPUID_EXT2_SYSCALL,
Pablo Greco e6a3ae
+        .features[FEAT_8000_0001_ECX] =
Pablo Greco e6a3ae
+            CPUID_EXT3_ABM | CPUID_EXT3_LAHF_LM | CPUID_EXT3_3DNOWPREFETCH,
Pablo Greco e6a3ae
+        .features[FEAT_7_0_EBX] =
Pablo Greco e6a3ae
+            CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 |
Pablo Greco e6a3ae
+            CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
Pablo Greco e6a3ae
+            CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
Pablo Greco e6a3ae
+            CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
Pablo Greco e6a3ae
+            CPUID_7_0_EBX_SMAP | CPUID_7_0_EBX_MPX | CPUID_7_0_EBX_CLWB |
Pablo Greco e6a3ae
+            CPUID_7_0_EBX_AVX512F | CPUID_7_0_EBX_AVX512DQ |
Pablo Greco e6a3ae
+            CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
Pablo Greco e6a3ae
+            CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT |
Pablo Greco e6a3ae
+            CPUID_7_0_EBX_INTEL_PT,
Pablo Greco e6a3ae
+        .features[FEAT_7_0_ECX] =
Pablo Greco e6a3ae
+            CPUID_7_0_ECX_PKU | CPUID_7_0_ECX_OSPKE |
Pablo Greco e6a3ae
+            CPUID_7_0_ECX_AVX512VNNI,
Pablo Greco e6a3ae
+        .features[FEAT_7_0_EDX] =
Pablo Greco e6a3ae
+            CPUID_7_0_EDX_SPEC_CTRL | CPUID_7_0_EDX_SPEC_CTRL_SSBD,
Pablo Greco e6a3ae
+        /* Missing: XSAVES (not supported by some Linux versions,
Pablo Greco e6a3ae
+                * including v4.1 to v4.12).
Pablo Greco e6a3ae
+                * KVM doesn't yet expose any XSAVES state save component,
Pablo Greco e6a3ae
+                * and the only one defined in Skylake (processor tracing)
Pablo Greco e6a3ae
+                * probably will block migration anyway.
Pablo Greco e6a3ae
+                */
Pablo Greco e6a3ae
+        .features[FEAT_XSAVE] =
Pablo Greco e6a3ae
+            CPUID_XSAVE_XSAVEOPT | CPUID_XSAVE_XSAVEC |
Pablo Greco e6a3ae
+            CPUID_XSAVE_XGETBV1,
Pablo Greco e6a3ae
+        .features[FEAT_6_EAX] =
Pablo Greco e6a3ae
+            CPUID_6_EAX_ARAT,
Pablo Greco e6a3ae
+        .xlevel = 0x80000008,
Pablo Greco e6a3ae
+        .model_id = "Intel Xeon Processor (Cascadelake)",
Pablo Greco e6a3ae
+    },
Pablo Greco e6a3ae
+    {
Pablo Greco e6a3ae
         .name = "Icelake-Client",
Pablo Greco e6a3ae
         .level = 0xd,
Pablo Greco e6a3ae
         .vendor = CPUID_VENDOR_INTEL,
Pablo Greco e6a3ae
-- 
Pablo Greco e6a3ae
1.8.3.1
Pablo Greco e6a3ae