qemu-e2k/include
Matthew Rosato 03451953c7 s390x/pci: reset ISM passthrough devices on shutdown and system reset
ISM device firmware stores unique state information that can
can cause a wholesale unmap of the associated IOMMU (e.g. when
we get a termination signal for QEMU) to trigger firmware errors
because firmware believes we are attempting to invalidate entries
that are still in-use by the guest OS (when in fact that guest is
in the process of being terminated or rebooted).
To alleviate this, register both a shutdown notifier (for unexpected
termination cases e.g. virsh destroy) as well as a reset callback
(for cases like guest OS reboot).  For each of these scenarios, trigger
PCI device reset; this is enough to indicate to firmware that the IOMMU
is no longer in-use by the guest OS, making it safe to invalidate any
associated IOMMU entries.

Fixes: 15d0e7942d ("s390x/pci: don't fence interpreted devices without MSI-X")
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Message-Id: <20221209195700.263824-1-mjrosato@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
[thuth: Adjusted the hunk in s390-pci-vfio.c due to different context]
Signed-off-by: Thomas Huth <thuth@redhat.com>
2022-12-15 15:02:34 +01:00
..
authz
block block: Make bdrv_child_get_parent_aio_context I/O 2022-11-10 14:58:34 +01:00
chardev
crypto crypto: Support export akcipher to pkcs8 2022-11-02 06:56:32 -04:00
disas
exec migration: Use non-atomic ops for clear log bitmap 2022-11-21 11:58:10 +01:00
fpu
hw s390x/pci: reset ISM passthrough devices on shutdown and system reset 2022-12-15 15:02:34 +01:00
io io: Tidy up fat-fingered parameter name 2022-12-14 16:19:35 +01:00
libdecnumber
migration
monitor qapi misc: Elide redundant has_FOO in generated C 2022-12-14 20:04:47 +01:00
net Add G_GNUC_PRINTF to function qemu_set_info_str and fix related issues 2022-11-27 13:36:17 -05:00
qapi
qemu qemu-config: Make config_parse_qdict() return bool 2022-12-14 16:19:35 +01:00
qom
scsi
semihosting
standard-headers
sysemu cryptodev: Add a lkcf-backend for cryptodev 2022-11-02 06:56:32 -04:00
tcg
ui
user
elf.h
glib-compat.h
qemu-io.h
qemu-main.h