Blob Blame History Raw
From cd8e278cd1b8bdd713838e61b7a9acda30d53ceb Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Mon, 16 Sep 2013 20:39:55 +0200
Subject: pc: rhel6 doesn't have APIC on pentium* CPU models

RH-Author: Eduardo Habkost <ehabkost@redhat.com>
Message-id: <1379363997-11783-3-git-send-email-ehabkost@redhat.com>
Patchwork-id: 54400
O-Subject: [RHEL7 PATCH 2/4] pc: rhel6 doesn't have APIC on pentium* CPU models
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
  (pc-0.12 already have CPUID_APIC enabled for almost 4 years)
Brew build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6290888

QEMU v0.13 and newer has CPUID_APIC set on pentium, pentium2, and
pentium3 CPU models[1], but v0.12 (and RHEL-6) don't have it. We need to
disable the flag on pc_init_rhel650() to keep compatibility.

[1] Upstream commit c84bd4f104098861e162be848a00d64c1fa76ed4

Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 950cfc2..27b6504 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -1031,6 +1031,10 @@ static QEMUMachine pc_machine_rhel700 = {
 
 static void pc_init_rhel650(MachineState *machine)
 {
+    x86_cpu_compat_set_features("pentium", FEAT_1_EDX, 0, CPUID_APIC);
+    x86_cpu_compat_set_features("pentium2", FEAT_1_EDX, 0, CPUID_APIC);
+    x86_cpu_compat_set_features("pentium3", FEAT_1_EDX, 0, CPUID_APIC);
+
     x86_cpu_compat_set_features("Conroe", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
     x86_cpu_compat_set_features("Penryn", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);
     x86_cpu_compat_set_features("Nehalem", FEAT_1_ECX, CPUID_EXT_X2APIC, 0);