All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: peter.crosthwaite@xilinx.com, marcel.a@redhat.com,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, aliguori@amazon.com, afaerber@suse.de
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	[thread overview]
Message-ID: <52DD1D54.8010102@redhat.com> (raw)
In-Reply-To: <20140120134502.05da1ffa@nial.usersys.redhat.com>

Il 20/01/2014 13:45, Igor Mammedov ha scritto:
> On Mon, 20 Jan 2014 13:36:39 +0200
> "Michael S. Tsirkin" <mst@redhat.com> 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

  reply	other threads:[~2014-01-20 12:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 16:55 [Qemu-devel] [PATCH 0/9 v4] Refactor PCI/SHPC/PCIE hotplug to use a more generic hotplug API Igor Mammedov
2014-01-14 16:55 ` [Qemu-devel] [PATCH 1/9] define hotplug interface Igor Mammedov
2014-01-14 16:55 ` [Qemu-devel] [PATCH 2/9] qdev: add to BusState "hotplug-handler" link Igor Mammedov
2014-01-14 16:55 ` [Qemu-devel] [PATCH 3/9] qdev: add "hotpluggable" property to Device Igor Mammedov
2014-01-14 16:55 ` [Qemu-devel] [PATCH 4/9] hw/acpi: move typeinfo to the file end Igor Mammedov
2014-01-14 16:55 ` [Qemu-devel] [PATCH 5/9] qdev:pci: refactor PCIDevice to use generic "hotpluggable" property Igor Mammedov
2014-01-14 16:55 ` [Qemu-devel] [PATCH 6/9] acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler API Igor Mammedov
2014-01-14 16:55 ` [Qemu-devel] [PATCH 7/9] pci/shpc: convert SHPC " Igor Mammedov
2014-01-14 16:55 ` [Qemu-devel] [PATCH 8/9] pci/pcie: convert PCIE " Igor Mammedov
2014-01-14 16:55 ` [Qemu-devel] [PATCH 9/9] hw/pci: switch to a generic hotplug handling for PCIDevice Igor Mammedov
2014-01-20 11:36   ` Michael S. Tsirkin
2014-01-20 12:45     ` Igor Mammedov
2014-01-20 12:57       ` Paolo Bonzini [this message]
2014-01-16  9:33 ` [Qemu-devel] [PATCH 0/9 v4] Refactor PCI/SHPC/PCIE hotplug to use a more generic hotplug API Michael S. Tsirkin
2014-01-16  9:38   ` Igor Mammedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52DD1D54.8010102@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=imammedo@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.