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

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