On Tue, Aug 31, 2021 at 08:23:39PM +0800, Li Feng wrote:
Currently, virtio-scsi doesn't support any control or event message, this patch adds the basic initialization.
Some backends need this feature, like dpdk/spdk vhost-user backend.
Reproduce:
- Start spdk vhost-user-scsi backend;
- Create a vm with a SCSI vhost-user-scsi disk and start the vm;
- Mount an iso to the vm without an OS;
- Stop the vhost-user-scsi backend;
- Vhost-user-scsi backend will crash before exiting when cleaning the resources.
IMHO this must be fixed in vhost-user-scsi no matter what. Host processes crashing in case the guest doesn't behave as expected is a security problem.
The reason is that the seabios virtio-scsi only initializes the req vq, then the spdk/dpdk treats it a not good session, it's hard to handle this tricky issue from dpdk architecture.
What is the exact problem here? vhost-user-scsi trying to send a hotplug event (when adding the iso, probably as virtual cdrom) and seabios not listening?
- if (vp_find_vq(vp, 1, &vq) < 0 ) {
dprintf(1, "fail to find event vq for virtio-scsi %pP\n", pci);
goto fail;
- }
That alone doesn't allow receiving events (no recv buffers added). Also note that seabios does not support hotplugging devices, so the only thing we could do with those events is to throw them away.
take care, Gerd