qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [QEMU RFC PATCH 7/7] generate APIC IDs according to CPU top


From: Eduardo Habkost
Subject: [Qemu-devel] [QEMU RFC PATCH 7/7] generate APIC IDs according to CPU topology
Date: Tue, 10 Jul 2012 17:22:22 -0300

NOTE: this is unfinished, and will break live-migration between older
and newer QEMU versions if applied as-is. We need to make the older
machine-types keep the existing behavior when generating APIC IDs.

Signed-off-by: Eduardo Habkost <address@hidden>
---
 target-i386/cpu.h |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index e983c10..860aeaa 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -21,6 +21,8 @@
 
 #include "config.h"
 #include "qemu-common.h"
+#include "topology.h"
+#include "cpus.h"
 
 #ifdef TARGET_X86_64
 #define TARGET_LONG_BITS 64
@@ -918,10 +920,7 @@ void host_cpuid(uint32_t function, uint32_t count,
  */
 static inline uint8_t apic_id_for_cpu(int cpu_index)
 {
-    /* right now APIC ID == CPU index. this will eventually change to use
-     * the CPU topology configuration properly
-     */
-    return cpu_index;
+    return topo_make_apicid(smp_cores, smp_threads, cpu_index);
 }
 
 
-- 
1.7.10.4




reply via email to

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