Blame SOURCES/kvm-i386-Add-new-model-of-Cascadelake-Server.patch

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