Re: [PATCH] vhost-user: send SET_STATUS 0 after GET_VRING_BASE

2023-05-01 Thread Stefan Hajnoczi
On Fri, Apr 21, 2023 at 01:30:48PM +0800, Yajun Wu wrote: > > On 4/20/2023 9:07 PM, Stefan Hajnoczi wrote: > > > > Setting the VIRTIO Device Status Field to 0 resets the device. The > > device's state is lost, including the vring configuration. > > > > vhost-user.c currently sends SET_STATUS 0 b

Re: [PATCH] vhost-user: send SET_STATUS 0 after GET_VRING_BASE

2023-04-20 Thread Michael S. Tsirkin
On Thu, Apr 20, 2023 at 09:07:06AM -0400, Stefan Hajnoczi wrote: > Setting the VIRTIO Device Status Field to 0 resets the device. The > device's state is lost, including the vring configuration. > > vhost-user.c currently sends SET_STATUS 0 before GET_VRING_BASE. This > risks confusion about the l

Re: [PATCH] vhost-user: send SET_STATUS 0 after GET_VRING_BASE

2023-04-20 Thread Yajun Wu
On 4/20/2023 9:07 PM, Stefan Hajnoczi wrote: Setting the VIRTIO Device Status Field to 0 resets the device. The device's state is lost, including the vring configuration. vhost-user.c currently sends SET_STATUS 0 before GET_VRING_BASE. This risks confusion about the lifetime of the vhost-user

[PATCH] vhost-user: send SET_STATUS 0 after GET_VRING_BASE

2023-04-20 Thread Stefan Hajnoczi
Setting the VIRTIO Device Status Field to 0 resets the device. The device's state is lost, including the vring configuration. vhost-user.c currently sends SET_STATUS 0 before GET_VRING_BASE. This risks confusion about the lifetime of the vhost-user state (e.g. vring last_avail_idx) across VIRTIO d