]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 2 Mar 2015 14:25:48 +0000 (14:25 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 2 Mar 2015 14:25:48 +0000 (14:25 +0000)
* remotes/ehabkost/tags/x86-pull-request:
  target-i386: Move APIC ID compatibility code to pc.c
  target-i386: Require APIC ID to be explicitly set before CPU realize
  target-i386: Set APIC ID using cpu_index on CONFIG_USER
  linux-user: Check for cpu_init() errors
  target-i386: Move CPUX86State.cpuid_apic_id to X86CPU.apic_id
  target-i386: Simplify error handling on cpu_x86_init_user()
  target-i386: Eliminate cpu_init() function
  target-i386: Rename cpu_x86_init() to cpu_x86_init_user()
  target-i386: Move topology.h to include/hw/i386
  target-i386: Eliminate unnecessary get_cpuid_vendor() function
  target-i386: Simplify listflags() function

Conflicts:
target-i386/cpu.c

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
1  2 
hw/i386/pc.c
target-i386/cpu.c

diff --cc hw/i386/pc.c
Simple merge
index d543e2b53704ae8db7e2a9eac9a878ef99818cae,70fd6db72f83d4e98f54528c2fbbc94ee71ce541..14c6c4abaf9889f9d0a13507b33f7dd0e9a140c6
@@@ -2156,20 -2141,29 +2141,28 @@@ CPUX86State *cpu_x86_init_user(const ch
  
      cpu = cpu_x86_create(cpu_model, NULL, &error);
      if (error) {
-         goto out;
+         goto error;
      }
  
-     object_property_set_bool(OBJECT(cpu), true, "realized", &error);
+     object_property_set_int(OBJECT(cpu), CPU(cpu)->cpu_index, "apic-id",
+                             &error);
+     if (error) {
+         goto error;
+     }
  
- out:
+     object_property_set_bool(OBJECT(cpu), true, "realized", &error);
      if (error) {
-         error_report_err(error);
-         if (cpu != NULL) {
-             object_unref(OBJECT(cpu));
-             cpu = NULL;
-         }
+         goto error;
      }
-     return cpu;
+     return &cpu->env;
+ error:
 -    error_report("%s", error_get_pretty(error));
 -    error_free(error);
++    error_report_err(error);
+     if (cpu != NULL) {
+         object_unref(OBJECT(cpu));
+     }
+     return NULL;
  }
  
  static void x86_cpu_cpudef_class_init(ObjectClass *oc, void *data)