[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 12/36] pseries: define coldplugged devices as "configur
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 12/36] pseries: define coldplugged devices as "configured" |
Date: |
Wed, 23 Sep 2015 11:55:14 +1000 |
From: Laurent Vivier <address@hidden>
When a device is hotplugged, attach() sets "configured" to
false, waiting an action from the OS to configure it and then
to call ibm,configure-connector. On ibm,configure-connector,
the hypervisor sets "configured" to true.
In case of coldplugged device, attach() sets "configured" to
false, but firmware and OS never call the ibm,configure-connector
in this case, so it remains set to false.
It could be harmless, but when we unplug a device, hypervisor
waits the device becomes configured because for it, a not configured
device is a device being configured, so it waits the end of configuration
to unplug it... and it never happens, so it is never unplugged.
This patch set by default coldplugged device to "configured=true",
hotplugged device to "configured=false".
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_drc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index 8cbcf4d..9ce844a 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -310,7 +310,7 @@ static void attach(sPAPRDRConnector *drc, DeviceState *d,
void *fdt,
drc->dev = d;
drc->fdt = fdt;
drc->fdt_start_offset = fdt_start_offset;
- drc->configured = false;
+ drc->configured = coldplug;
object_property_add_link(OBJECT(drc), "device",
object_get_typename(OBJECT(drc->dev)),
--
2.4.3
- [Qemu-ppc] [PULL 00/36] spapr-next queue 20150923, David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 01/36] spapr: Provide an error message when migration fails due to htab_shift mismatch, David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 03/36] spapr: Add /ibm,partition-name, David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 18/36] spapr: Initialize hotplug memory address space, David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 12/36] pseries: define coldplugged devices as "configured",
David Gibson <=
- [Qemu-ppc] [PULL 09/36] ppc/spapr: Use qemu_log_mask() for hcall_dprintf(), David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 02/36] spapr: Create pseries-2.5 machine, David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 11/36] sPAPR: Introduce rtas_ldq(), David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 04/36] spapr: Add /rtas/ibm,change-msix-capable, David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 05/36] spapr: Make ibm, change-msi respect 3 return values, David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 06/36] spapr: SPLPAR Characteristics, David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 24/36] spapr: Make hash table size a factor of maxram_size, David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 20/36] spapr: Don't use QOM [*] syntax for DR connectors., David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 08/36] spapr_drc: Fix potential undefined behaviour, David Gibson, 2015/09/22
- [Qemu-ppc] [PULL 27/36] spapr: Provide better error message when slots exceed max allowed, David Gibson, 2015/09/22