cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 9913f2856aeeaa05b7b5e3188865901f79ea2166 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Mon, 16 Sep 2013 20:39:56 +0200
Subject: [PATCH 07/25] pc: RHEL-6 had x2apic set on Opteron_G[123]

RH-Author: Eduardo Habkost <ehabkost@redhat.com>
Message-id: <1379363997-11783-4-git-send-email-ehabkost@redhat.com>
Patchwork-id: 54401
O-Subject: [RHEL7 PATCH 3/4] pc: RHEL-6 had x2apic set on Opteron_G[123]
Bugzilla: 918907
RH-Acked-by: Bandan Das <bsd@redhat.com>
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

From: Eduardo Habkost <ehabkost@raisama.net>

Bugzilla: 918907
Upstream status: not applicable
  (RHEL-6-only quirk that is not going to be included upstream)
Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6290888

The Opteron_G[123] CPU models had x2apic set since they were first added
to RHEL-6, but they don't have it set upstream. We need to explicitly
set it on pc_init_rhel650() to keep compatibility.

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
---
 hw/i386/pc_piix.c | 4 ++++
 1 file changed, 4 insertions(+)

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

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 6fe6ba0..eb3a07d 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -891,6 +891,10 @@ static void pc_init_rhel650(QEMUMachineInitArgs *args)
                                 0, CPUID_EXT2_RDTSCP);
     x86_cpu_compat_set_features("Haswell", FEAT_8000_0001_EDX,
                                 0, CPUID_EXT2_RDTSCP);
+
+    x86_cpu_compat_set_features("Opteron_G1", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
+    x86_cpu_compat_set_features("Opteron_G2", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
+    x86_cpu_compat_set_features("Opteron_G3", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
     pc_init_rhel700(args);
 }
 
-- 
1.7.1