]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/i386/pc_q35.c
-machine vmport=auto: Fix handling of VMWare ioport emulation for xen
[mirror_qemu.git] / hw / i386 / pc_q35.c
index e9ba1a273569717fa6fa06d0fe54907f3c2836a1..0262b5ef19f427ba0faaee9c20883a612f878972 100644 (file)
@@ -242,9 +242,14 @@ static void pc_q35_init(MachineState *machine)
 
     pc_register_ferr_irq(gsi[13]);
 
+    assert(pc_machine->vmport != ON_OFF_AUTO_MAX);
+    if (pc_machine->vmport == ON_OFF_AUTO_AUTO) {
+        pc_machine->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON;
+    }
+
     /* init basic PC hardware */
     pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy,
-                         !pc_machine->vmport, 0xff0104);
+                         (pc_machine->vmport != ON_OFF_AUTO_ON), 0xff0104);
 
     /* connect pm stuff to lpc */
     ich9_lpc_pm_init(lpc);