vhost-user: Slave crashes as Master unmaps vrings during guest reboot
PATCH 1/1 vhost-user: Slave crashes as Master unmaps vrings during guest reboot
Problem:
--------
If a guest has vhost-user enabled, then on reboot vhost_virtqueue_stop is invoked. This unmaps vring memory mappings. However, it will not give any indication to the underlying DPDK slave application about it. Therefore, a pollmode DPDK driver tries to read the ring to check for packets and segfaults.
Solution:
----------VHOST_USER_RESET_OWNER API is issued by QEMU so that DPDK slave application is informed that mappings will be soon gone so that it can take necessary steps.
Shesha Sreenivasamurthy (1):
vhost-user: Slave crashes as Master unmaps vrings during guest reboot
hw/virtio/vhost.c | 5 +++++ 1 file changed, 5 insertions(+)
Signature · 1 line
1.9.5 (Apple Git-50.3)
PATCH 1/1 vhost-user: Slave crashes as Master unmaps vrings during guest reboot
Send VHOST_USER_RESET_OWNER when the device is stopped.
--- hw/virtio/vhost.c | 5 +++++ 1 file changed, 5 insertions(+)
hw/virtio/vhost.c +5 -0
@@ -1256,6 +1256,11 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev) hdev->vq_index + i); } +if (hdev->vhost_ops->vhost_reset_device (hdev) <0 ) { +fprintf (stderr,"vhost reset device %s failed\n" , vdev->name); +fflush (stderr); + } +vhost_log_put (hdev, true); hdev->started = false; hdev->log =NULL ;
Signature · 1 line
1.9.5 (Apple Git-50.3)