[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 v4 1/1] -machine vmport=auto: Fi
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 v4 1/1] -machine vmport=auto: Fix handling of VMWare ioport emulation for xen |
Date: |
Thu, 20 Nov 2014 17:05:54 -0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Nov 20, 2014 at 01:21:18PM -0500, Don Slutz wrote:
[...]
> @@ -242,9 +243,16 @@ 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) {
> + no_vmport = xen_enabled();
> + } else {
> + no_vmport = (pc_machine->vmport != ON_OFF_AUTO_ON);
> + }
> +
> /* init basic PC hardware */
> pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy,
> - !pc_machine->vmport, 0xff0104);
> + no_vmport, 0xff0104);
>
Sorry for suggesting yet another change, but: what about changing
pc_machine->vmport here instead of using a no_vmport variable, so the
actual vmport configuration may be queried by anybody later using the
QOM property? It would even make the code shorter.
I mean:
if (pc_machine->vmport == ON_OFF_AUTO_AUTO) {
pc_machine->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON);
}
pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy,
(pc_machine->vmport != ON_OFF_AUTO_ON), 0xff0104);
--
Eduardo