Blob Blame History Raw
From b0e92beaf0cd1146d417bff8241940762ab3d60f Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Wed, 18 Sep 2013 20:49:59 +0200
Subject: [PATCH 28/29] target-i386: add cpu64-rhel6 CPU model

RH-Author: Eduardo Habkost <ehabkost@redhat.com>
Message-id: <1379537399-7308-1-git-send-email-ehabkost@redhat.com>
Patchwork-id: 54451
O-Subject: [RHEL-7 qemu-kvm PATCH] target-i386: add cpu64-rhel6 CPU model
Bugzilla: 918907
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Bandan Das <bsd@redhat.com>

Bugzilla: 918907
Upstream status: not applicable
Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6300787

RHEL-6 has a cpu64-rhel6 CPU model, and it is even the default CPU
model. We need to allow migration from RHEL-6, so we need to have a
compatible cpu64-rhel6 CPU model to be present.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Change v1 -> v2:
 - Don't include cpu64-rhel5 CPU model. It won't be supported
---
 target-i386/cpu.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 target-i386/cpu.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 355375b..051ab39 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -668,6 +668,29 @@ static x86_def_t builtin_x86_defs[] = {
         .model_id = "Intel(R) Atom(TM) CPU N270   @ 1.60GHz",
     },
     {
+        .name = "cpu64-rhel6",
+        .level = 4,
+        .vendor = CPUID_VENDOR_AMD,
+        .family = 6,
+        .model = 13,
+        .stepping = 3,
+        .features[FEAT_1_EDX] = CPUID_SSE2 | CPUID_SSE | CPUID_FXSR |
+             CPUID_MMX | CPUID_CLFLUSH | CPUID_PSE36 | CPUID_PAT | CPUID_CMOV |
+             CPUID_MCA | CPUID_PGE | CPUID_MTRR | CPUID_SEP | CPUID_APIC |
+             CPUID_CX8 | CPUID_MCE | CPUID_PAE | CPUID_MSR | CPUID_TSC |
+             CPUID_PSE | CPUID_DE | CPUID_FP87,
+        .features[FEAT_1_ECX] = CPUID_EXT_CX16 | CPUID_EXT_SSE3,
+        .features[FEAT_8000_0001_EDX] = CPUID_EXT2_LM | CPUID_EXT2_FXSR |
+             CPUID_EXT2_MMX | CPUID_EXT2_NX | CPUID_EXT2_PAT | CPUID_EXT2_CMOV |
+             CPUID_EXT2_PGE | CPUID_EXT2_SYSCALL | CPUID_EXT2_APIC |
+             CPUID_EXT2_CX8 | CPUID_EXT2_MCE | CPUID_EXT2_PAE | CPUID_EXT2_MSR | CPUID_EXT2_TSC |
+             CPUID_EXT2_PSE | CPUID_EXT2_DE | CPUID_EXT2_FPU,
+        .features[FEAT_8000_0001_ECX] = CPUID_EXT3_SSE4A | CPUID_EXT3_ABM |
+             CPUID_EXT3_SVM | CPUID_EXT3_LAHF_LM,
+        .xlevel = 0x8000000A,
+        .model_id = "QEMU Virtual CPU version (cpu64-rhel6)",
+    },
+    {
         .name = "Conroe",
         .level = 4,
         .vendor = CPUID_VENDOR_INTEL,
-- 
1.7.1