qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/4] move CPUID_APIC flag to where it belongs


From: Glauber Costa
Subject: [Qemu-devel] [PATCH 2/4] move CPUID_APIC flag to where it belongs
Date: Thu, 7 May 2009 14:51:01 -0400

We can safely do that inconditionally, so move to processor defined
flags like any other flag. ISA machines will still see a LAPIC, but
it should behave fine as a normal PIC.

Signed-off-by: Glauber Costa <address@hidden>
---
 hw/pc.c              |    4 ----
 target-i386/helper.c |    2 +-
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index 351de83..b726c17 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -851,10 +851,6 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
         }
         if (i != 0)
             env->halted = 1;
-        if (smp_cpus > 1) {
-            /* XXX: enable it in all cases */
-            env->cpuid_features |= CPUID_APIC;
-        }
         if (pci_enabled) {
             apic_init(env);
         }
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 2210412..2c11cd3 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -102,7 +102,7 @@ typedef struct x86_def_t {
     char model_id[48];
 } x86_def_t;
 
-#define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE)
+#define I486_FEATURES (CPUID_FP87 | CPUID_VME | CPUID_PSE | CPUID_APIC)
 #define PENTIUM_FEATURES (I486_FEATURES | CPUID_DE | CPUID_TSC | \
           CPUID_MSR | CPUID_MCE | CPUID_CX8 | CPUID_MMX)
 #define PENTIUM2_FEATURES (PENTIUM_FEATURES | CPUID_PAE | CPUID_SEP | \
-- 
1.5.6.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]