218e99
From b0e92beaf0cd1146d417bff8241940762ab3d60f Mon Sep 17 00:00:00 2001
218e99
From: Eduardo Habkost <ehabkost@redhat.com>
218e99
Date: Wed, 18 Sep 2013 20:49:59 +0200
218e99
Subject: [PATCH 28/29] target-i386: add cpu64-rhel6 CPU model
218e99
218e99
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
218e99
Message-id: <1379537399-7308-1-git-send-email-ehabkost@redhat.com>
218e99
Patchwork-id: 54451
218e99
O-Subject: [RHEL-7 qemu-kvm PATCH] target-i386: add cpu64-rhel6 CPU model
218e99
Bugzilla: 918907
218e99
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
218e99
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
RH-Acked-by: Bandan Das <bsd@redhat.com>
218e99
218e99
Bugzilla: 918907
218e99
Upstream status: not applicable
218e99
Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6300787
218e99
218e99
RHEL-6 has a cpu64-rhel6 CPU model, and it is even the default CPU
218e99
model. We need to allow migration from RHEL-6, so we need to have a
218e99
compatible cpu64-rhel6 CPU model to be present.
218e99
218e99
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
218e99
---
218e99
Change v1 -> v2:
218e99
 - Don't include cpu64-rhel5 CPU model. It won't be supported
218e99
---
218e99
 target-i386/cpu.c | 23 +++++++++++++++++++++++
218e99
 1 file changed, 23 insertions(+)
218e99
218e99
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
218e99
---
218e99
 target-i386/cpu.c |   23 +++++++++++++++++++++++
218e99
 1 files changed, 23 insertions(+), 0 deletions(-)
218e99
218e99
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
218e99
index 355375b..051ab39 100644
218e99
--- a/target-i386/cpu.c
218e99
+++ b/target-i386/cpu.c
218e99
@@ -668,6 +668,29 @@ static x86_def_t builtin_x86_defs[] = {
218e99
         .model_id = "Intel(R) Atom(TM) CPU N270   @ 1.60GHz",
218e99
     },
218e99
     {
218e99
+        .name = "cpu64-rhel6",
218e99
+        .level = 4,
218e99
+        .vendor = CPUID_VENDOR_AMD,
218e99
+        .family = 6,
218e99
+        .model = 13,
218e99
+        .stepping = 3,
218e99
+        .features[FEAT_1_EDX] = CPUID_SSE2 | CPUID_SSE | CPUID_FXSR |
218e99
+             CPUID_MMX | CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV |
218e99
+             CPUID_MCA | CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC |
218e99
+             CPUID_CX8 | CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC |
218e99
+             CPUID_PSE | CPUID_DE | CPUID_FP87,
218e99
+        .features[FEAT_1_ECX] = CPUID_EXT_CX16 | CPUID_EXT_SSE3,
218e99
+        .features[FEAT_8000_0001_EDX] = CPUID_EXT2_LM | CPUID_EXT2_FXSR |
218e99
+             CPUID_EXT2_MMX | CPUID_EXT2_NX | CPUID_EXT2_PAT | CPUID_EXT2_CMOV |
218e99
+             CPUID_EXT2_PGE | CPUID_EXT2_SYSCALL | CPUID_EXT2_APIC |
218e99
+             CPUID_EXT2_CX8 | CPUID_EXT2_MCE | CPUID_EXT2_PAE | CPUID_EXT2_MSR | CPUID_EXT2_TSC |
218e99
+             CPUID_EXT2_PSE | CPUID_EXT2_DE | CPUID_EXT2_FPU,
218e99
+        .features[FEAT_8000_0001_ECX] = CPUID_EXT3_SSE4A | CPUID_EXT3_ABM |
218e99
+             CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM,
218e99
+        .xlevel = 0x8000000A,
218e99
+        .model_id = "QEMU Virtual CPU version (cpu64-rhel6)",
218e99
+    },
218e99
+    {
218e99
         .name = "Conroe",
218e99
         .level = 4,
218e99
         .vendor = CPUID_VENDOR_INTEL,
218e99
-- 
218e99
1.7.1
218e99