qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Cannot not unplug cold-plugged devices
@ 2010-11-12  6:29 Cam Macdonell
  2010-11-12  7:24 ` [Qemu-devel] " Isaku Yamahata
  0 siblings, 1 reply; 9+ messages in thread
From: Cam Macdonell @ 2010-11-12  6:29 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers; +Cc: Isaku Yamahata, Michael S. Tsirkin

Hi,

I was trying to do a "device_del" on my ivshmem device and it won't
work unless the device is added via hotplug.  If the device is
coldplugged (added at startup) then nothing happens.  I think I
tracked this behaviour to the patch below.

Is not allowing coldplugged devices to be unplugged the desired behaviour?

Thanks,
Cam

commit 5beb8ad503c88a76f2b8106c3b74b4ce485a60e1
Author: Isaku Yamahata <yamahata@valinux.co.jp>
Date:   Mon Sep 6 16:46:18 2010 +0900

    pci: call hotplug callback even when not hotplug case for later use.

    call hotplug callback even when not hotplug case for later use.
    And move hotplug check into hotplug callback.
    PCIE slot needs this for card presence detection.

    Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index bfa1d9a..24dfcf2 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -611,6 +611,9 @@ static int piix4_device_hotplug(DeviceState *qdev,
PCIDevice *dev, int state)
     PIIX4PMState *s = DO_UPCAST(PIIX4PMState, dev,
                                 DO_UPCAST(PCIDevice, qdev, qdev));

+    if (!dev->qdev.hotplugged)
+        return 0;
+
     s->pci0_status.up = 0;
     s->pci0_status.down = 0;
     if (state) {

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-11-14 10:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-12  6:29 [Qemu-devel] Cannot not unplug cold-plugged devices Cam Macdonell
2010-11-12  7:24 ` [Qemu-devel] " Isaku Yamahata
2010-11-12  9:18   ` Michael S. Tsirkin
2010-11-12  9:59     ` Isaku Yamahata
2010-11-12 11:26       ` Michael S. Tsirkin
2010-11-12 12:50         ` Isaku Yamahata
2010-11-13 20:59           ` Michael S. Tsirkin
2010-11-14  2:57             ` Isaku Yamahata
2010-11-14 10:11               ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).