]> git.proxmox.com Git - qemu.git/blobdiff - xen-all.c
hw/pci-host/versatile.c: Provide property for forcing broken IRQ mapping
[qemu.git] / xen-all.c
index 50edaecbf17cc0fb8227623898c8c5dc60a0e48d..539a1549a5cee3b313dbb67dad636735a194e8a5 100644 (file)
--- a/xen-all.c
+++ b/xen-all.c
 #include <sys/mman.h>
 
 #include "hw/pci/pci.h"
-#include "hw/pc.h"
-#include "hw/xen_common.h"
-#include "hw/xen_backend.h"
+#include "hw/i386/pc.h"
+#include "hw/xen/xen_common.h"
+#include "hw/xen/xen_backend.h"
 #include "qmp-commands.h"
 
+#include "sysemu/char.h"
 #include "qemu/range.h"
 #include "sysemu/xen-mapcache.h"
 #include "trace.h"
@@ -577,18 +578,18 @@ void qmp_xen_set_global_dirty_log(bool enable, Error **errp)
 
 static void xen_reset_vcpu(void *opaque)
 {
-    CPUArchState *env = opaque;
+    CPUState *cpu = opaque;
 
-    env->halted = 1;
+    cpu->halted = 1;
 }
 
 void xen_vcpu_init(void)
 {
-    CPUArchState *first_cpu;
+    if (first_cpu != NULL) {
+        CPUState *cpu = ENV_GET_CPU(first_cpu);
 
-    if ((first_cpu = qemu_get_cpu(0))) {
-        qemu_register_reset(xen_reset_vcpu, first_cpu);
-        xen_reset_vcpu(first_cpu);
+        qemu_register_reset(xen_reset_vcpu, cpu);
+        xen_reset_vcpu(cpu);
     }
     /* if rtc_clock is left to default (host_clock), disable it */
     if (rtc_clock == host_clock) {