qemu/hw/virtio
Andrew Melnychenko df07a8f8cb virtio-pci: Changed return values for "notify", "device" and "isr" read.
At some point, after unplugging virtio-pci the virtio device may be unrealised,
but the memory regions may be present in flatview. So, it's a possible situation
when memory region's callbacks are called for "unplugged" device.

Previous two patches made sure this case does not cause QEMU to crash.
This patch adds check for "notify" memory region. Now reads will return "-1" if a virtio
device is not present on a virtio bus.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1938042
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1743098

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Message-Id: <20210609095843.141378-4-andrew@daynix.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-07-03 01:39:33 -04:00
..
Kconfig
meson.build
trace-events
trace.h
vhost-backend.c
vhost-scsi-pci.c
vhost-stub.c
vhost-user-blk-pci.c
vhost-user-fs-pci.c
vhost-user-fs.c
vhost-user-input-pci.c
vhost-user-scsi-pci.c
vhost-user-vsock-pci.c
vhost-user-vsock.c
vhost-user.c
vhost-vdpa.c
vhost-vsock-common.c
vhost-vsock-pci.c
vhost-vsock.c
vhost.c
virtio-9p-pci.c
virtio-balloon-pci.c
virtio-balloon.c
virtio-blk-pci.c
virtio-bus.c
virtio-crypto-pci.c
virtio-crypto.c
virtio-input-host-pci.c
virtio-input-pci.c
virtio-iommu-pci.c
virtio-iommu.c
virtio-mem-pci.c
virtio-mem-pci.h
virtio-mem.c
virtio-mmio.c
virtio-net-pci.c
virtio-pci.c virtio-pci: Changed return values for "notify", "device" and "isr" read. 2021-07-03 01:39:33 -04:00
virtio-pci.h
virtio-pmem-pci.c
virtio-pmem-pci.h
virtio-pmem.c
virtio-rng-pci.c
virtio-rng.c
virtio-scsi-pci.c
virtio-serial-pci.c
virtio.c