qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC] pseries: define coldplugged devices as "configured"
@ 2015-08-13 12:53 Laurent Vivier
  2015-08-14  5:20 ` Bharata B Rao
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Laurent Vivier @ 2015-08-13 12:53 UTC (permalink / raw)
  To: Alexander Graf, qemu-ppc, qemu-devel, Michael Roth; +Cc: lvivier, dgibson

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 <lvivier@redhat.com>
---
 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 ee87432..e86babf 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.1.0

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

end of thread, other threads:[~2015-09-01  5:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-13 12:53 [Qemu-devel] [PATCH RFC] pseries: define coldplugged devices as "configured" Laurent Vivier
2015-08-14  5:20 ` Bharata B Rao
2015-08-14  7:16   ` Laurent Vivier
2015-08-14  7:44     ` Bharata B Rao
2015-08-14  7:46   ` Laurent Vivier
2015-08-23 19:08     ` Michael Roth
2015-08-26 13:04       ` Laurent Vivier
2015-08-14 12:33 ` [Qemu-devel] [Qemu-ppc] " Laurent Vivier
2015-09-01  5:00 ` David Gibson

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).