aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/pc_q35.c
diff options
context:
space:
mode:
authorDon Slutz <dslutz@verizon.com>2014-11-21 11:18:52 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2014-11-26 12:11:27 +0100
commitd1048bef9df0aacde9a54bf9b5b97a6e10950d8c (patch)
treef7028b9b852ae94b7c949907541335a2233ef65f /hw/i386/pc_q35.c
parent2528043f1f299e0e88cb026f1ca7c40bbb4e1f80 (diff)
-machine vmport=auto: Fix handling of VMWare ioport emulation for xen
c/s 9b23cfb76b3a5e9eb5cc899eaf2f46bc46d33ba4 or c/s b154537ad07598377ebf98252fb7d2aff127983b moved the testing of xen_enabled() from pc_init1() to pc_machine_initfn(). xen_enabled() does not return the correct value in pc_machine_initfn(). Changed vmport from a bool to an enum. Added the value "auto" to do the old way. Move check of xen_enabled() back to pc_init1(). Acked-by: Eric Blake <eblake@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Don Slutz <dslutz@verizon.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386/pc_q35.c')
-rw-r--r--hw/i386/pc_q35.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index e9ba1a2735..0262b5ef19 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -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);