]> xenbits.xensource.com Git - qemu-upstream-4.2-testing.git/commitdiff
xen: Fix PV-on-HVM
authorAnthony PERARD <anthony.perard@citrix.com>
Mon, 21 May 2012 16:12:43 +0000 (16:12 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 22 May 2012 16:44:33 +0000 (16:44 +0000)
In the context of PV-on-HVM under Xen, the emulated nics are supposed to be
unplug before the guest drivers are initialized, when the guest write to a
specific IO port.

Without this patch, the guest end up with two nics with the same MAC, the
emulated nic and the PV nic.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/xen_platform.c

index 5e792f56f66cc1230bbc9868e68092f0149443e2..068be8b4714a43587fcc3551ba2b3a97aacbe962 100644 (file)
@@ -87,7 +87,7 @@ static void unplug_nic(PCIBus *b, PCIDevice *d)
 {
     if (pci_get_word(d->config + PCI_CLASS_DEVICE) ==
             PCI_CLASS_NETWORK_ETHERNET) {
-        qdev_unplug(&(d->qdev));
+        qdev_free(&(d->qdev));
     }
 }