[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v10 03/11] virtio-pci: fix hot unplug.
From: |
fred . konrad |
Subject: |
[Qemu-devel] [PATCH v10 03/11] virtio-pci: fix hot unplug. |
Date: |
Mon, 18 Mar 2013 17:37:20 +0100 |
From: KONRAD Frederic <address@hidden>
Hot unplug failed because it tried to free the virtio device two times.
This fix the issue by removing the call to virtio_bus_destroy_device.
Signed-off-by: KONRAD Frederic <address@hidden>
---
hw/virtio-pci.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index c795cc6..f0dd823 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -1412,13 +1412,6 @@ static void virtio_pci_device_plugged(DeviceState *d)
proxy->host_features);
}
-/* This is called by virtio-bus just before the device is unplugged. */
-static void virtio_pci_device_unplug(DeviceState *d)
-{
- VirtIOPCIProxy *dev = VIRTIO_PCI(d);
- virtio_pci_stop_ioeventfd(dev);
-}
-
static int virtio_pci_init(PCIDevice *pci_dev)
{
VirtIOPCIProxy *dev = VIRTIO_PCI(pci_dev);
@@ -1433,10 +1426,7 @@ static int virtio_pci_init(PCIDevice *pci_dev)
static void virtio_pci_exit(PCIDevice *pci_dev)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(pci_dev);
- VirtioBusState *bus = VIRTIO_BUS(&proxy->bus);
- BusState *qbus = BUS(&proxy->bus);
- virtio_bus_destroy_device(bus);
- qbus_free(qbus);
+ virtio_pci_stop_ioeventfd(proxy);
virtio_exit_pci(pci_dev);
}
@@ -1503,7 +1493,6 @@ static void virtio_pci_bus_class_init(ObjectClass *klass,
void *data)
k->set_guest_notifiers = virtio_pci_set_guest_notifiers;
k->vmstate_change = virtio_pci_vmstate_change;
k->device_plugged = virtio_pci_device_plugged;
- k->device_unplug = virtio_pci_device_unplug;
}
static const TypeInfo virtio_pci_bus_info = {
--
1.7.11.7
- [Qemu-devel] [PATCH v10 00/11] virtio-blk refactoring., fred . konrad, 2013/03/18
- [Qemu-devel] [PATCH v10 02/11] virtio-x-bus: fix allow_hotplug assertion., fred . konrad, 2013/03/18
- [Qemu-devel] [PATCH v10 01/11] virtio: make virtio device's structures public., fred . konrad, 2013/03/18
- [Qemu-devel] [PATCH v10 06/11] virtio-blk-pci: switch to new API., fred . konrad, 2013/03/18
- [Qemu-devel] [PATCH v10 08/11] virtio-blk-ccw switch to new API., fred . konrad, 2013/03/18
- [Qemu-devel] [PATCH v10 05/11] virtio-blk: add the virtio-blk device., fred . konrad, 2013/03/18
- [Qemu-devel] [PATCH v10 09/11] virtio-blk: cleanup: init and exit functions., fred . konrad, 2013/03/18
- [Qemu-devel] [PATCH v10 07/11] virtio-blk-s390: switch to the new API., fred . konrad, 2013/03/18
- [Qemu-devel] [PATCH v10 04/11] virtio-blk: don't use pointer for configuration., fred . konrad, 2013/03/18
- [Qemu-devel] [PATCH v10 03/11] virtio-pci: fix hot unplug.,
fred . konrad <=
- [Qemu-devel] [PATCH v10 10/11] virtio-blk: cleanup: QOM cast, fred . konrad, 2013/03/18
- Re: [Qemu-devel] [PATCH v10 00/11] virtio-blk refactoring., Cornelia Huck, 2013/03/18
- [Qemu-devel] [PATCH v10 11/11] virtio-blk: cleanup: remove qdev field., fred . konrad, 2013/03/18
- Re: [Qemu-devel] [PATCH v10 00/11] virtio-blk refactoring., Anthony Liguori, 2013/03/18