[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] virtio_cleanup() missing in virtio-{blk, balloon, 9p}-p
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] virtio_cleanup() missing in virtio-{blk, balloon, 9p}-pci |
Date: |
Tue, 12 Oct 2010 14:18:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
"M. Mohan Kumar" <address@hidden> writes:
>> Pattern:
>>
>> FOO's PCIDeviceInfo method exit is virtio_FOO_exit_pci(), which calls
>> virtio_FOO_exit() and virtio_exit_pci().
>>
>> virtio_{net,serial}_exit() call virtio_cleanup().
>>
>> virtio_blk_exit() doesn't. Why?
>>
>> virtio-balloon-pci uses virtio_exit_pci() as exit method. No
>> virtio_cleanup()?
>>
>> virtio-9p-pci doesn't have an exit method. Doesn't feel right.
>
> 9p does not support hot-plug now. We will implement virtio_9p_exit when we
> are
> adding support for hot-plug
If hot plug is not expected to work, perhaps the driver should refuse
it. Untested sketch:
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 729917d..b09d85d 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -683,6 +683,11 @@ static int virtio_9p_init_pci(PCIDevice *pci_dev)
VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
VirtIODevice *vdev;
+ if (pci_dev->qdev.hotplugged) {
+ error_report("Device doesn't support hot plug");
+ return -1;
+ }
+
vdev = virtio_9p_init(&pci_dev->qdev, &proxy->fsconf);
virtio_init_pci(proxy, vdev,
PCI_VENDOR_ID_REDHAT_QUMRANET,
- [Qemu-devel] virtio_cleanup() missing in virtio-{blk, balloon, 9p}-pci, Markus Armbruster, 2010/10/11
- [Qemu-devel] Re: virtio_cleanup() missing in virtio-{blk, balloon, 9p}-pci, Kevin Wolf, 2010/10/11
- Re: [Qemu-devel] virtio_cleanup() missing in virtio-{blk, balloon, 9p}-pci, M. Mohan Kumar, 2010/10/12
- Re: [Qemu-devel] virtio_cleanup() missing in virtio-{blk, balloon, 9p}-pci,
Markus Armbruster <=