Blame SOURCES/kvm-target-i386-Copy-cpu64-rhel6-definition-into-qemu64.patch

0a122b
From 4941c3e5c2366f008c90f1f58a49c0ed203fce11 Mon Sep 17 00:00:00 2001
0a122b
From: Eduardo Habkost <ehabkost@redhat.com>
0a122b
Date: Tue, 25 Mar 2014 16:03:47 +0100
0a122b
Subject: [PATCH 2/2] target-i386: Copy cpu64-rhel6 definition into qemu64
0a122b
0a122b
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
0a122b
Message-id: <1395763427-31684-3-git-send-email-ehabkost@redhat.com>
0a122b
Patchwork-id: 58248
0a122b
O-Subject: [RHEL7 qemu-kvm PATCH 2/2] target-i386: Copy cpu64-rhel6 definition into qemu64
0a122b
Bugzilla: 1080170
0a122b
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
0a122b
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
0a122b
RH-Acked-by: Bandan Das <bsd@redhat.com>
0a122b
0a122b
Bugzilla: 1078607
0a122b
Brew scratch build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7250917
0a122b
Upstream status: not applicable
0a122b
0a122b
The CPUID data from cpu64-rhel6 is a better default than qemu64. Among
0a122b
other things, this fixes MSI problems on 32-bit Windows guests.
0a122b
0a122b
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
0a122b
---
0a122b
 target-i386/cpu.c | 33 ++++++++++++++++++++-------------
0a122b
 1 file changed, 20 insertions(+), 13 deletions(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 target-i386/cpu.c |   33 ++++++++++++++++++++-------------
0a122b
 1 files changed, 20 insertions(+), 13 deletions(-)
0a122b
0a122b
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
0a122b
index 005e190..e65318e 100644
0a122b
--- a/target-i386/cpu.c
0a122b
+++ b/target-i386/cpu.c
0a122b
@@ -440,24 +440,31 @@ typedef struct x86_def_t {
0a122b
  */
0a122b
 static x86_def_t builtin_x86_defs[] = {
0a122b
     {
0a122b
+        /* qemu64 is the default CPU model for all *-rhel7.* machine-types.
0a122b
+         * The default on RHEL-6 was cpu64-rhel6.
0a122b
+         * libvirt assumes that qemu64 is the default for _all_ machine-types,
0a122b
+         * so we should try to keep qemu64 and cpu64-rhel6 as similar as
0a122b
+         * possible.
0a122b
+         */
0a122b
         .name = "qemu64",
0a122b
         .level = 4,
0a122b
         .vendor = CPUID_VENDOR_AMD,
0a122b
         .family = 6,
0a122b
-        .model = 6,
0a122b
+        .model = 13,
0a122b
         .stepping = 3,
0a122b
-        .features[FEAT_1_EDX] =
0a122b
-            PPRO_FEATURES |
0a122b
-            CPUID_MTRR | CPUID_CLFLUSH | CPUID_MCA |
0a122b
-            CPUID_PSE36,
0a122b
-        .features[FEAT_1_ECX] =
0a122b
-            CPUID_EXT_SSE3 | CPUID_EXT_CX16 | CPUID_EXT_POPCNT,
0a122b
-        .features[FEAT_8000_0001_EDX] =
0a122b
-            (PPRO_FEATURES & CPUID_EXT2_AMD_ALIASES) |
0a122b
-            CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
0a122b
-        .features[FEAT_8000_0001_ECX] =
0a122b
-            CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM |
0a122b
-            CPUID_EXT3_ABM | CPUID_EXT3_SSE4A,
0a122b
+        .features[FEAT_1_EDX] = CPUID_SSE2 | CPUID_SSE | CPUID_FXSR |
0a122b
+             CPUID_MMX | CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV |
0a122b
+             CPUID_MCA | CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC |
0a122b
+             CPUID_CX8 | CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC |
0a122b
+             CPUID_PSE | CPUID_DE | CPUID_FP87,
0a122b
+        .features[FEAT_1_ECX] = CPUID_EXT_CX16 | CPUID_EXT_SSE3,
0a122b
+        .features[FEAT_8000_0001_EDX] = CPUID_EXT2_LM | CPUID_EXT2_FXSR |
0a122b
+             CPUID_EXT2_MMX | CPUID_EXT2_NX | CPUID_EXT2_PAT | CPUID_EXT2_CMOV |
0a122b
+             CPUID_EXT2_PGE | CPUID_EXT2_SYSCALL | CPUID_EXT2_APIC |
0a122b
+             CPUID_EXT2_CX8 | CPUID_EXT2_MCE | CPUID_EXT2_PAE | CPUID_EXT2_MSR | CPUID_EXT2_TSC |
0a122b
+             CPUID_EXT2_PSE | CPUID_EXT2_DE | CPUID_EXT2_FPU,
0a122b
+        .features[FEAT_8000_0001_ECX] = CPUID_EXT3_SSE4A | CPUID_EXT3_ABM |
0a122b
+             CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM,
0a122b
         .xlevel = 0x8000000A,
0a122b
     },
0a122b
     {
0a122b
-- 
0a122b
1.7.1
0a122b