]> Git Repo - qemu.git/commitdiff
pseries: define coldplugged devices as "configured"
authorLaurent Vivier <[email protected]>
Thu, 13 Aug 2015 12:53:02 +0000 (14:53 +0200)
committerDavid Gibson <[email protected]>
Wed, 23 Sep 2015 00:51:09 +0000 (10:51 +1000)
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 <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: David Gibson <[email protected]>
hw/ppc/spapr_drc.c

index 8cbcf4d346248cf3dd6fe8ae00ac4c280c0887e1..9ce844ab1e54f0e0e53c3b87c3d08d421e98bd32 100644 (file)
@@ -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)),
This page took 0.028261 seconds and 4 git commands to generate.