[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 9/9] hw/pci: switch to a generic hotplug handlin
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 9/9] hw/pci: switch to a generic hotplug handling for PCIDevice |
Date: |
Mon, 20 Jan 2014 13:57:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 20/01/2014 13:45, Igor Mammedov ha scritto:
> On Mon, 20 Jan 2014 13:36:39 +0200
> "Michael S. Tsirkin" <address@hidden> wrote:
>
>> On Tue, Jan 14, 2014 at 05:55:54PM +0100, Igor Mammedov wrote:
>>> make qdev_unplug()/device_set_realized() to call hotplug handler's
>>> plug/unplug methods if available and remove not needed anymore
>>> hot(un)plug handling from PCIDevice.
>>>
>>> In case if hotplug handler is not available, revert to the legacy
>>> hotplug method.
>>
>> When isn't it available?
>> For buses other than PCI?
> For example scsi virtio usb buses.
> Paolo said he would convert scsi bus to this interface once series is in.
>
> Eventually all hotluggable buses will/should be converted to new interface
> so that we could get rid of legacy implementation.
There are just 2 interesting implementations apart from PCI and SCSI:
hw/ide/piix.c: dc->unplug = pci_piix3_xen_ide_unplug;
hw/pci/pci.c: k->unplug = pci_unplug_device;
hw/s390x/virtio-ccw.c: dc->unplug = virtio_ccw_busdev_unplug;
hw/scsi/scsi-bus.c: k->unplug = scsi_qdev_unplug;
Then, all that remains is these four:
hw/char/virtio-serial-bus.c: k->unplug = qdev_simple_unplug_cb;
hw/s390x/event-facility.c: dc->unplug = qdev_simple_unplug_cb;
hw/s390x/s390-virtio-bus.c: dc->unplug = qdev_simple_unplug_cb;
hw/usb/bus.c: k->unplug = qdev_simple_unplug_cb;
but we can just inline qdev_simple_unplug_cb in the caller.
Paolo
- [Qemu-devel] [PATCH 3/9] qdev: add "hotpluggable" property to Device, (continued)
- [Qemu-devel] [PATCH 3/9] qdev: add "hotpluggable" property to Device, Igor Mammedov, 2014/01/14
- [Qemu-devel] [PATCH 2/9] qdev: add to BusState "hotplug-handler" link, Igor Mammedov, 2014/01/14
- [Qemu-devel] [PATCH 4/9] hw/acpi: move typeinfo to the file end, Igor Mammedov, 2014/01/14
- [Qemu-devel] [PATCH 5/9] qdev:pci: refactor PCIDevice to use generic "hotpluggable" property, Igor Mammedov, 2014/01/14
- [Qemu-devel] [PATCH 7/9] pci/shpc: convert SHPC hotplug to use hotplug-handler API, Igor Mammedov, 2014/01/14
- [Qemu-devel] [PATCH 8/9] pci/pcie: convert PCIE hotplug to use hotplug-handler API, Igor Mammedov, 2014/01/14
- [Qemu-devel] [PATCH 6/9] acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler API, Igor Mammedov, 2014/01/14
- [Qemu-devel] [PATCH 9/9] hw/pci: switch to a generic hotplug handling for PCIDevice, Igor Mammedov, 2014/01/14
- Re: [Qemu-devel] [PATCH 0/9 v4] Refactor PCI/SHPC/PCIE hotplug to use a more generic hotplug API, Michael S. Tsirkin, 2014/01/16