qemu-e2k/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 virtio-mem: Paravirtualized memory hot(un)plug 2020-07-03 07:57:04 -04:00
meson.build meson: convert hw/virtio 2020-08-21 06:30:26 -04:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vhost-backend.c vhost: Return 0/-errno in vhost_dev_init() 2021-06-30 13:16:05 +02:00
vhost-scsi-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
vhost-stub.c vhost-user: simplify vhost_user_init/vhost_user_cleanup 2019-03-12 21:22:31 -04:00
vhost-user-blk-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
vhost-user-fs-pci.c vhost-user-fs: add the "bootindex" property 2021-01-13 09:06:37 -05:00
vhost-user-fs.c vhost: Add Error parameter to vhost_dev_init() 2021-06-30 13:15:44 +02:00
vhost-user-input-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
vhost-user-scsi-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
vhost-user-vsock-pci.c vhost-user-vsock-pci: force virtio version 1 2020-09-29 02:15:24 -04:00
vhost-user-vsock.c vhost: Distinguish errors in vhost_dev_get_config() 2021-06-30 13:18:42 +02:00
vhost-user.c vhost: Distinguish errors in vhost_dev_get_config() 2021-06-30 13:18:42 +02:00
vhost-vdpa.c vhost: Distinguish errors in vhost_dev_get_config() 2021-06-30 13:18:42 +02:00
vhost-vsock-common.c Remove superfluous timer_del() calls 2021-01-08 15:13:38 +00:00
vhost-vsock-pci.c vhost-vsock-pci: force virtio version 1 2020-09-29 02:15:24 -04:00
vhost-vsock.c vhost: Add Error parameter to vhost_dev_init() 2021-06-30 13:15:44 +02:00
vhost.c vhost: Distinguish errors in vhost_dev_get_config() 2021-06-30 13:18:42 +02:00
virtio-9p-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
virtio-balloon-pci.c hw/virtio/virtio-balloon: Remove the "class" property 2021-02-05 08:52:59 -05:00
virtio-balloon.c migrate/ram: remove "ram_bulk_stage" and "fpo_enabled" 2021-05-13 18:21:13 +01:00
virtio-blk-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
virtio-bus.c virtio: Fail if iommu_platform is requested, but unsupported 2021-05-18 12:57:38 +02:00
virtio-crypto-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
virtio-crypto.c virtio-crypto: don't modify elem->in/out_sg 2020-09-23 13:41:58 +01:00
virtio-input-host-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
virtio-input-pci.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
virtio-iommu-pci.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
virtio-iommu.c virtio-iommu: Handle non power of 2 range invalidations 2021-03-12 12:40:10 +00:00
virtio-mem-pci.c virito-mem: Implement get_min_alignment() 2020-11-03 07:19:26 -05:00
virtio-mem-pci.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
virtio-mem.c migrate/ram: remove "ram_bulk_stage" and "fpo_enabled" 2021-05-13 18:21:13 +01:00
virtio-mmio.c virtio: disable ioeventfd for record/replay 2021-07-02 10:20:13 -04:00
virtio-net-pci.c virtio-net: calculating proper msix vectors on init 2021-03-15 16:41:22 +08:00
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-pci: compat page aligned ATS 2021-04-06 07:11:36 -04:00
virtio-pmem-pci.c virtio-pmem-pci: force virtio version 1 2020-09-29 02:14:30 -04:00
virtio-pmem-pci.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
virtio-pmem.c virtio-pmem: fix virtio_pmem_resp assign problem 2021-03-22 10:17:53 -04:00
virtio-rng-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
virtio-rng.c sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
virtio-scsi-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
virtio-serial-pci.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
virtio.c virtio: Clarify MR transaction optimization 2021-07-02 11:13:39 -04:00