qemu-devel
[Top][All Lists]
Advanced

[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: Don Slutz
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 14:09:56 -0500
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 11/20/14 14:05, Eduardo Habkost wrote:
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);



Look better to me also.  So will adjust the patch.

    -Don Slutz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]