[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: Cannot not unplug cold-plugged devices
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] Re: Cannot not unplug cold-plugged devices |
Date: |
Fri, 12 Nov 2010 16:24:11 +0900 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Thu, Nov 11, 2010 at 11:29:39PM -0700, Cam Macdonell wrote:
> 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?
Oh, my bad. Does the following patch help?
>From 45914b2fc95750b65685dfb98a435f58e38b45ba Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Isaku Yamahata <address@hidden>
Date: Fri, 12 Nov 2010 16:21:35 +0900
Subject: [PATCH] acpi/piix4: allow pci hotplug for cold plugged device.
This patch fixes 5beb8ad503c88a76f2b8106c3b74b4ce485a60e1
reported by Cam Macdonell <address@hidden>.
Before the change set, cold plugged device can be hot unplugged.
This patch unbreaks it.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/acpi_piix4.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index 66c7885..bca330e 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -621,8 +621,10 @@ 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)
+ /* qemu initialization case */
+ if (state && !dev->qdev.hotplugged) {
return 0;
+ }
s->pci0_status.up = 0;
s->pci0_status.down = 0;
--
1.7.1.1
--
yamahata
- [Qemu-devel] Cannot not unplug cold-plugged devices, Cam Macdonell, 2010/11/12
- [Qemu-devel] Re: Cannot not unplug cold-plugged devices,
Isaku Yamahata <=
- [Qemu-devel] Re: Cannot not unplug cold-plugged devices, Michael S. Tsirkin, 2010/11/12
- [Qemu-devel] Re: Cannot not unplug cold-plugged devices, Isaku Yamahata, 2010/11/12
- [Qemu-devel] Re: Cannot not unplug cold-plugged devices, Michael S. Tsirkin, 2010/11/12
- [Qemu-devel] Re: Cannot not unplug cold-plugged devices, Isaku Yamahata, 2010/11/12
- [Qemu-devel] Re: Cannot not unplug cold-plugged devices, Michael S. Tsirkin, 2010/11/13
- [Qemu-devel] Re: Cannot not unplug cold-plugged devices, Isaku Yamahata, 2010/11/13
- [Qemu-devel] Re: Cannot not unplug cold-plugged devices, Michael S. Tsirkin, 2010/11/14