qemu/hw/scsi
Dongli Zhang 1a5a2629ea vhost-scsi: support VIRTIO_SCSI_F_HOTPLUG
So far there isn't way to test host kernel vhost-scsi event queue path,
because VIRTIO_SCSI_F_HOTPLUG isn't supported by QEMU.

virtio-scsi.c and vhost-user-scsi.c already support VIRTIO_SCSI_F_HOTPLUG
as property "hotplug".

Add support to vhost-scsi.c to help evaluate and test event queue.

To test the feature:

1. Create vhost-scsi target with targetcli.

targetcli /backstores/fileio create name=storage file_or_dev=disk01.raw
targetcli /vhost create naa.1123451234512345
targetcli /vhost/naa.1123451234512345/tpg1/luns create /backstores/fileio/storage

2. Create QEMU instance with vhost-scsi.

-device vhost-scsi-pci,wwpn=naa.1123451234512345,hotplug=true

3. Once guest bootup, hotplug a new LUN from host.

targetcli /backstores/fileio create name=storage02 file_or_dev=disk02.raw
targetcli /vhost/naa.1123451234512345/tpg1/luns create /backstores/fileio/storage02

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Message-Id: <20250203005215.1502-1-dongli.zhang@oracle.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
2025-05-14 05:39:15 -04:00
..
emulation.c scsi-generic: avoid invalid access to struct when emulating block limits 2018-11-06 21:35:06 +01:00
esp-pci.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
esp.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
Kconfig hw/scsi: Introduce VHOST_SCSI_COMMON symbol in Kconfig 2023-06-23 02:54:44 -04:00
lsi53c895a.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
megasas.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
meson.build hw/virtio: Build various target-agnostic objects just once 2023-06-23 02:54:44 -04:00
mfi.h hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
mpi.h hw: Add support for LSI SAS1068 (mptsas) device 2016-02-09 15:45:26 +01:00
mptconfig.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
mptendian.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
mptsas.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
mptsas.h include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
scsi-bus.c system/runstate: add VM state change cb with return value 2025-05-14 05:39:14 -04:00
scsi-disk.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
scsi-generic.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
spapr_vscsi.c qom: Have class_init() take a const data argument 2025-04-25 17:00:41 +02:00
srp.h spapr-vscsi: add task management 2013-09-12 08:46:21 +02:00
trace-events hw/scsi/lsi53c895a: add timer to scripts processing 2024-03-08 15:51:21 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
vhost-scsi-common.c vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
vhost-scsi.c vhost-scsi: support VIRTIO_SCSI_F_HOTPLUG 2025-05-14 05:39:15 -04:00
vhost-user-scsi.c vhost-user: return failure if backend crash when live migration 2025-05-14 05:39:15 -04:00
viosrp.h Updated the FSF address to <https://www.gnu.org/licenses/> 2023-02-27 09:15:39 +01:00
virtio-scsi-dataplane.c virtio-scsi: only expose cmd vqs via iothread-vq-mapping 2025-03-13 17:57:23 +01:00
virtio-scsi.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
vmw_pvscsi.c qom: Make InterfaceInfo[] uses const 2025-04-25 17:00:41 +02:00
vmw_pvscsi.h scsi: VMWare PVSCSI paravirtual device implementation 2013-04-19 10:44:17 +02:00