qemu/include
Stefan Hajnoczi c0c4f14729 virtio: call ->vhost_reset_device() during reset
vhost-user-scsi has a VirtioDeviceClass->reset() function that calls
->vhost_reset_device(). The other vhost devices don't notify the vhost
device upon reset.

Stateful vhost devices may need to handle device reset in order to free
resources or prevent stale device state from interfering after reset.

Call ->vhost_device_reset() from virtio_reset() so that that vhost
devices are notified of device reset.

This patch affects behavior as follows:
- vhost-kernel: No change in behavior since ->vhost_reset_device() is
  not implemented.
- vhost-user: back-ends that negotiate
  VHOST_USER_PROTOCOL_F_RESET_DEVICE now receive a
  VHOST_USER_DEVICE_RESET message upon device reset. Otherwise there is
  no change in behavior. DPDK, SPDK, libvhost-user, and the
  vhost-user-backend crate do not negotiate
  VHOST_USER_PROTOCOL_F_RESET_DEVICE automatically.
- vhost-vdpa: an extra SET_STATUS 0 call is made during device reset.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20231004014532.1228637-4-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
2023-10-22 05:18:16 -04:00
..
authz
block hw/ufs: fixes 2023-10-16 12:37:22 -04:00
chardev include/: spelling fixes 2023-09-08 13:08:52 +03:00
crypto crypto: Add generic 64-bit carry-less multiply routine 2023-09-15 13:57:00 +00:00
disas disas: Change type of disassemble_info.target_info to pointer 2023-06-13 17:25:47 +10:00
exec memory: initialize 'fv' in MemoryRegionCache to make Coverity happy 2023-10-22 05:18:16 -04:00
fpu fpu: Add conversions between bfloat16 and [u]int8 2023-09-16 14:57:15 +00:00
gdbstub gdbstub: replace exit calls with proper shutdown for softmmu 2023-10-12 12:36:37 +10:00
hw virtio: call ->vhost_reset_device() during reset 2023-10-22 05:18:16 -04:00
io io: follow coroutine AioContext in qio_channel_yield() 2023-09-07 20:32:11 -05:00
libdecnumber
migration migration: hold the BQL during setup 2023-10-17 09:25:13 +02:00
monitor monitor: add more *_locked() functions 2023-05-25 10:18:33 +02:00
net net/net: Clean up global variable shadowing 2023-10-06 13:27:43 +02:00
qapi qobject atomics osdep: Make a few macros more hygienic 2023-09-29 08:13:57 +02:00
qemu * util/log: re-allow switching away from stderr log file 2023-10-09 10:11:18 -04:00
qom qom/object_interfaces: Clean up global variable shadowing 2023-10-06 13:27:48 +02:00
scsi hw/ufs: Support for UFS logical unit 2023-09-07 14:01:29 -04:00
semihosting * util/log: re-allow switching away from stderr log file 2023-10-09 10:11:18 -04:00
standard-headers linux-headers: Update to Linux v6.6-rc1 2023-09-12 11:34:56 +02:00
sysemu Block layer patches 2023-10-16 12:34:45 -04:00
tcg tcg: Correct invalid mentions of 'softmmu' by 'system-mode' 2023-10-07 19:02:33 +02:00
ui ui: add XBGR8888 and ABGR8888 in drm_format_pixman_map 2023-10-03 15:04:56 +04:00
user bulk: Do not declare function prototypes using 'extern' keyword 2023-08-31 19:47:43 +02:00
elf.h util: spelling fixes 2023-08-31 19:47:43 +02:00
glib-compat.h
qemu-io.h
qemu-main.h