On 20-10-23, 16:48, Mathieu Poirier wrote:
Hey guys,
I tried to start the vhost-device-rng daemon with QEMU v8.1.0 when I noticed that upon startup QEMU crashes [1]. The last known good version is v7.2.0. A bisect session between the two tags yielded this commit [2]. In that patch the hunk that starts at line 1176 adds a call to virtio_pci_set_guest_notifier() with a second parameter of VIRTIO_CONFIG_IRQ_IDX, which is -1. That call trickles down to function vhost_user_get_vq_index() [3] where the assert is generated. I am guessing that all the pci based vhost-devices would be affected by this change, hence this email. Has anyone seen this when using a version of QEMU that is higher than v7.2.0?
To reproduce, start the vhost-device-rng with:
$ ./vhost-device-rng --socket-path=$(PATH_TO_SOCKET)/rng.sock -c 1 -m 512 -p 1000
And in another shell start qemu v8.1.0 with something that looks like this[4], with line 7 to 10 being the most important. Here I'm using RNG but I suppose any of the vhost-devices would be affected by this.
I'll wait to hear back from you guys before I make a fool of myself on the QEMU failing list.
This reminds of the fix I added long back, just in case it helps you:
commit 91208dd297f2 ("virtio: i2c: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX")