]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commitdiff
Revert "cpu: Introduce get_arch_id() method and override it for X86CPU"
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 2 Oct 2013 16:16:30 +0000 (17:16 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Wed, 2 Oct 2013 16:16:30 +0000 (17:16 +0100)
This reverts commit e48f3af500a229bf9bf63fbe02ca6ef35abc2820.

include/qemu/cpu.h
qom/cpu.c
target-i386/cpu.c

index 8d2e0cb58713b482ac551572e2b25fad417c3640..61b76982f1442771e338d22ed43b17b4060b5415 100644 (file)
@@ -41,7 +41,6 @@ typedef struct CPUState CPUState;
 /**
  * CPUClass:
  * @reset: Callback to reset the #CPUState to its initial state.
- * @get_arch_id: Callback for getting architecture-dependent CPU ID.
  *
  * Represents a CPU family or model.
  */
@@ -51,7 +50,6 @@ typedef struct CPUClass {
     /*< public >*/
 
     void (*reset)(CPUState *cpu);
-    int64_t (*get_arch_id)(CPUState *cpu);
 } CPUClass;
 
 /**
index dfd14c8f44d84682a95168e308f8dc8aca4e8789..5b360469c5aea90fad44db1b455c14c5e62d5a1c 100644 (file)
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -34,19 +34,11 @@ static void cpu_common_reset(CPUState *cpu)
 {
 }
 
-static int64_t cpu_common_get_arch_id(CPUState *cpu)
-{
-    /* Not used in Xen, so no backport.
-     * There is a missing cpu_index field in CPUState. */
-    abort();
-}
-
 static void cpu_class_init(ObjectClass *klass, void *data)
 {
     CPUClass *k = CPU_CLASS(klass);
 
     k->reset = cpu_common_reset;
-    k->get_arch_id = cpu_common_get_arch_id;
 }
 
 static TypeInfo cpu_type_info = {
index e055d69a60111391f7bab78c87e2ac2d08ce6997..c6c2ca03a1b42c485aff42e8bda57508fef13087 100644 (file)
@@ -2111,14 +2111,6 @@ static void x86_cpu_initfn(Object *obj)
     }
 }
 
-static int64_t x86_cpu_get_arch_id(CPUState *cs)
-{
-    X86CPU *cpu = X86_CPU(cs);
-    CPUX86State *env = &cpu->env;
-
-    return env->cpuid_apic_id;
-}
-
 static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
 {
     X86CPUClass *xcc = X86_CPU_CLASS(oc);
@@ -2126,8 +2118,6 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
 
     xcc->parent_reset = cc->reset;
     cc->reset = x86_cpu_reset;
-
-    cc->get_arch_id = x86_cpu_get_arch_id;
 }
 
 static const TypeInfo x86_cpu_type_info = {