]> git.proxmox.com Git - mirror_qemu.git/commit
s390x/pci: drive ISM reset from subsystem reset
authorMatthew Rosato <mjrosato@linux.ibm.com>
Thu, 18 Jan 2024 18:51:51 +0000 (13:51 -0500)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 22 Jan 2024 15:23:48 +0000 (18:23 +0300)
commit003d0c7eb449231b0cd9870e295f04840a9b5c05
tree41337de8c33b3cf51fabd05ea81567801b71e597
parentc2985e38d803e62091f77ecb372c9c5fdf997239
s390x/pci: drive ISM reset from subsystem reset

ISM devices are sensitive to manipulation of the IOMMU, so the ISM device
needs to be reset before the vfio-pci device is reset (triggering a full
UNMAP).  In order to ensure this occurs, trigger ISM device resets from
subsystem_reset before triggering the PCI bus reset (which will also
trigger vfio-pci reset).  This only needs to be done for ISM devices
which were enabled for use by the guest.
Further, ensure that AIF is disabled as part of the reset event.

Fixes: ef1535901a ("s390x: do a subsystem reset before the unprotect on reboot")
Fixes: 03451953c7 ("s390x/pci: reset ISM passthrough devices on shutdown and system reset")
Reported-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Message-ID: <20240118185151.265329-4-mjrosato@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 68c691ca99a2538d6a53a70ce8a9ce06ee307ff1)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/s390x/s390-pci-bus.c
hw/s390x/s390-virtio-ccw.c
include/hw/s390x/s390-pci-bus.h