qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1] s390x/pci: Send correct event on hotplug.
@ 2019-01-10 21:03 David Hildenbrand
  2019-01-11  7:16 ` David Hildenbrand
  2019-01-15  9:27 ` [Qemu-devel] " Cornelia Huck
  0 siblings, 2 replies; 9+ messages in thread
From: David Hildenbrand @ 2019-01-10 21:03 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-s390x, Collin Walling, Thomas Huth, Christian Borntraeger,
	Cornelia Huck, Richard Henderson, David Hildenbrand

Comit 2c28c490571f ("s390x/pci: let pci devices start in configured mode")
changed the initial state of zPCI devices from ZPCI_FS_STANDBY to
ZPCI_FS_DISABLED (a.k.a. configured). However we still only send a
HP_EVENT_RESERVED_TO_STANDBY event to the guest, indicating a wrong
state.

Let's send a HP_EVENT_TO_CONFIGURED event instead, to match the actual
state the device is in.

This fixes hotplugged devices having to be enabled explicitly in the
guest e.g. via echo 1 > /sys/bus/pci/slots/00000000/power.

Fixes: 2c28c490571f ("s390x/pci: let pci devices start in configured mode")
Report-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
 hw/s390x/s390-pci-bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 15759b6514..7f911b216a 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -899,7 +899,7 @@ static void s390_pcihost_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
         }
 
         if (dev->hotplugged) {
-            s390_pci_generate_plug_event(HP_EVENT_RESERVED_TO_STANDBY,
+            s390_pci_generate_plug_event(HP_EVENT_TO_CONFIGURED ,
                                          pbdev->fh, pbdev->fid);
         }
     } else if (object_dynamic_cast(OBJECT(dev), TYPE_S390_PCI_DEVICE)) {
-- 
2.17.2

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

end of thread, other threads:[~2019-01-15  9:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-10 21:03 [Qemu-devel] [PATCH v1] s390x/pci: Send correct event on hotplug David Hildenbrand
2019-01-11  7:16 ` David Hildenbrand
2019-01-11  9:38   ` Cornelia Huck
2019-01-14 10:06     ` Pierre Morel
2019-01-14 17:44       ` Cornelia Huck
2019-01-14 20:00         ` [Qemu-devel] [qemu-s390x] " Collin Walling
2019-01-14 20:59           ` David Hildenbrand
2019-01-15  9:25             ` Cornelia Huck
2019-01-15  9:27 ` [Qemu-devel] " Cornelia Huck

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