You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/hw/virtio
Alex Bennée 71e076a07d hw/virtio: generalise CHR_EVENT_CLOSED handling
..and use for both virtio-user-blk and virtio-user-gpio. This avoids
the circular close by deferring shutdown due to disconnection until a
later point. virtio-user-blk already had this mechanism in place so
generalise it as a vhost-user helper function and use for both blk and
gpio devices.

While we are at it we also fix up vhost-user-gpio to re-establish the
event handler after close down so we can reconnect later.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20221130112439.2527228-5-alex.bennee@linaro.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2 years ago
..
Kconfig hw/virtio: add boilerplate for vhost-user-gpio device 2 years ago
meson.build qmp: add QMP command x-query-virtio 2 years ago
trace-events vhost: enable vrings in vhost_dev_start() for vhost-user devices 2 years ago
trace.h trace: switch position of headers to what Meson requires 4 years ago
vhost-backend.c vhost: add method vhost_set_vring_err 2 years ago
vhost-iova-tree.c util: accept iova_tree_remove_parameter by value 2 years ago
vhost-iova-tree.h util: accept iova_tree_remove_parameter by value 2 years ago
vhost-scsi-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
vhost-shadow-virtqueue.c vhost: Accept event idx flag 2 years ago
vhost-shadow-virtqueue.h vhost: Add svq avail_handler callback 2 years ago
vhost-stub.c vhost-user: simplify vhost_user_init/vhost_user_cleanup 6 years ago
vhost-user-blk-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
vhost-user-fs-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
vhost-user-fs.c vhost: enable vrings in vhost_dev_start() for vhost-user devices 2 years ago
vhost-user-gpio-pci.c hw/virtio: add vhost-user-gpio-pci boilerplate 2 years ago
vhost-user-gpio.c hw/virtio: generalise CHR_EVENT_CLOSED handling 2 years ago
vhost-user-i2c-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
vhost-user-i2c.c vhost: enable vrings in vhost_dev_start() for vhost-user devices 2 years ago
vhost-user-input-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
vhost-user-rng-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
vhost-user-rng.c vhost: enable vrings in vhost_dev_start() for vhost-user devices 2 years ago
vhost-user-scsi-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
vhost-user-vsock-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
vhost-user-vsock.c hw/virtio: introduce virtio_device_should_start 2 years ago
vhost-user.c hw/virtio: generalise CHR_EVENT_CLOSED handling 2 years ago
vhost-vdpa.c vdpa: Delete CVQ migration blocker 2 years ago
vhost-vsock-common.c vhost: enable vrings in vhost_dev_start() for vhost-user devices 2 years ago
vhost-vsock-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
vhost-vsock.c hw/virtio: introduce virtio_device_should_start 2 years ago
vhost.c vhost: enable vrings in vhost_dev_start() for vhost-user devices 2 years ago
virtio-9p-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
virtio-balloon-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
virtio-balloon.c virtio: drop name parameter for virtio_init() 3 years ago
virtio-blk-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
virtio-bus.c virtio: stop ioeventfd on reset 2 years ago
virtio-crypto-pci.c Use DECLARE_*CHECKER* macros 4 years ago
virtio-crypto.c virtio-crypto: Support asynchronous mode 2 years ago
virtio-input-host-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
virtio-input-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
virtio-iommu-pci.c hw/virtio/virtio-iommu-pci: Enforce the device is plugged on the root bus 2 years ago
virtio-iommu.c hw/virtio/virtio-iommu: Enforce power-of-two notify for both MAP and UNMAP 2 years ago
virtio-mem-pci.c pci-ids: drop PCI_DEVICE_ID_VIRTIO_MEM 2 years ago
virtio-mem-pci.h Use DECLARE_*CHECKER* macros 4 years ago
virtio-mem.c util: Make qemu_prealloc_mem() optionally consume a ThreadContext 2 years ago
virtio-mmio.c virtio-mmio: cleanup reset 2 years ago
virtio-net-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
virtio-pci.c msix: Assert that specified vector is in range 2 years ago
virtio-pmem-pci.c pci-ids: drop PCI_DEVICE_ID_VIRTIO_PMEM 2 years ago
virtio-pmem-pci.h Use DECLARE_*CHECKER* macros 4 years ago
virtio-pmem.c virtio: drop name parameter for virtio_init() 3 years ago
virtio-rng-pci.c virtio-rng-pci: Allow setting nvectors, so we can use MSI-X 2 years ago
virtio-rng.c virtio: drop name parameter for virtio_init() 3 years ago
virtio-scsi-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
virtio-serial-pci.c hw/virtio: move virtio-pci.h into shared include space 3 years ago
virtio-stub.c qmp: add QMP command x-query-virtio-queue-element 2 years ago
virtio.c virtio: disable error for out of spec queue-enable 2 years ago