]> git.proxmox.com Git - mirror_qemu.git/commit
vhost-user-gpio: Configure vhost_dev when connecting
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Mon, 30 Jan 2023 14:03:20 +0000 (23:03 +0900)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 2 Mar 2023 08:10:47 +0000 (03:10 -0500)
commitdaae36c13abc73cf1055abc2d33cb71cc5d34310
treedc34de6d4b157b670659b733841dd153ce82c7b8
parente1a0e635c91e4e1255c16a178afde30aa32b7efe
vhost-user-gpio: Configure vhost_dev when connecting

vhost_dev_cleanup(), called from vu_gpio_disconnect(), clears vhost_dev
so vhost-user-gpio must set the members of vhost_dev each time
connecting.

do_vhost_user_cleanup() should also acquire the pointer to vqs directly
from VHostUserGPIO instead of referring to vhost_dev as it can be called
after vhost_dev_cleanup().

Fixes: 27ba7b027f ("hw/virtio: add boilerplate for vhost-user-gpio device")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230130140320.77999-1-akihiko.odaki@daynix.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost-user-gpio.c
include/hw/virtio/vhost-user-gpio.h