qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] s390x/pci: fix ISM reset
@ 2024-01-16 22:31 Matthew Rosato
  2024-01-16 22:31 ` [PATCH 1/3] s390x/pci: avoid double enable/disable of aif Matthew Rosato
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Matthew Rosato @ 2024-01-16 22:31 UTC (permalink / raw)
  To: qemu-s390x
  Cc: farman, thuth, clg, frankja, pasic, borntraeger,
	richard.henderson, david, iii, qemu-devel

Commit ef1535901a0 (re-)introduced an issue where passthrough ISM devices
on s390x would enter an error state after reboot.  This was previously fixed
by 03451953c79e, using device reset callbacks, however the change in
ef1535901a0 effectively triggers a cold reset of the pci bus before the
device reset callbacks are triggered.

To resolve this, this series proposes to remove the use of the reset callback
for ISM cleanup and instead trigger ISM reset from subsystem_reset before 
triggering bus resets.  This has to happen before the bus resets because the
reset of s390-pcihost will trigger reset of the PCI bus followed by the
s390-pci bus, and the former will trigger vfio-pci reset / the aperture-wide
unmap that ISM gets upset about.
 
  /s390-pcihost (s390-pcihost)
    /pci.0 (PCI)
    /s390-pcibus.0 (s390-pcibus)
    
While fixing this, it was also noted that kernel warnings could be seen that
indicate a guest ISC reference count error.  That's because in some reset
cases we were not bothering to disable AIF, but would again re-enable it after
the reset (causing the reference count to grow erroneously).  This was a base
issue that went unnoticed because the kernel previously did not detect and
issue a warning for this scenario. 

Matthew Rosato (3):
  s390x/pci: avoid double enable/disable of aif
  s390x/pci: refresh fh before disabling aif
  s390x/pci: drive ISM reset from subsystem reset

 hw/s390x/s390-pci-bus.c         | 26 ++++++++++++++++---------
 hw/s390x/s390-pci-kvm.c         | 34 +++++++++++++++++++++++++++++++--
 hw/s390x/s390-virtio-ccw.c      |  2 ++
 include/hw/s390x/s390-pci-bus.h |  2 ++
 4 files changed, 53 insertions(+), 11 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2024-01-18  7:38 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 22:31 [PATCH 0/3] s390x/pci: fix ISM reset Matthew Rosato
2024-01-16 22:31 ` [PATCH 1/3] s390x/pci: avoid double enable/disable of aif Matthew Rosato
2024-01-17  1:57   ` Eric Farman
2024-01-17 15:06     ` Matthew Rosato
2024-01-17 10:54   ` Cédric Le Goater
2024-01-17 15:11     ` Matthew Rosato
2024-01-16 22:31 ` [PATCH 2/3] s390x/pci: refresh fh before disabling aif Matthew Rosato
2024-01-17  2:01   ` Eric Farman
2024-01-17 10:31   ` Cédric Le Goater
2024-01-17 15:07     ` Matthew Rosato
2024-01-17 10:40   ` Cédric Le Goater
2024-01-17 15:17     ` Matthew Rosato
2024-01-16 22:31 ` [PATCH 3/3] s390x/pci: drive ISM reset from subsystem reset Matthew Rosato
2024-01-17  3:01   ` Eric Farman
2024-01-17 15:07     ` Matthew Rosato
2024-01-17 11:01   ` Cédric Le Goater
2024-01-17 15:19     ` Matthew Rosato
2024-01-17 21:11       ` Matthew Rosato
2024-01-18  7:02         ` Cédric Le Goater
2024-01-18  6:03 ` [PATCH 0/3] s390x/pci: fix ISM reset Michael Tokarev
2024-01-18  7:19   ` Thomas Huth
2024-01-18  7:37     ` Michael Tokarev

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