Re: Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

From
Yongji Xie <hidden>
Date
2021-06-24 09:16:55
Also in
linux-fsdevel, linux-iommu, lkml, netdev
Reply to
Jason Wang, 2021-06-24
On Thu, Jun 24, 2021 at 4:14 PM Jason Wang [off-list ref] wrote:

在 2021/6/24 下午12:46, Yongji Xie 写道:
quoted
quoted
So we need to deal with both FEATURES_OK and reset, but probably not
DRIVER_OK.
OK, I see. Thanks for the explanation. One more question is how about
clearing the corresponding status bit in get_status() rather than
making set_status() fail. Since the spec recommends this way for
validation which is done in virtio_dev_remove() and
virtio_finalize_features().

Thanks,
Yongji
I think you can. Or it would be even better that we just don't set the
bit during set_status().
Yes, that's what I mean.
I just realize that in vdpa_reset() we had:

static inline void vdpa_reset(struct vdpa_device *vdev)
{
         const struct vdpa_config_ops *ops = vdev->config;

         vdev->features_valid = false;
         ops->set_status(vdev, 0);
}

We probably need to add the synchronization here. E.g re-read with a
timeout.
Looks like the timeout is already in set_status(). Do we really need a
duplicated one here? And how to handle failure? Adding a return value
to virtio_config_ops->reset() and passing the error to the upper
layer?

Thanks,
Yongji
Thread (71 messages) 71 messages, 7 authors, last reply 2021-08-25
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help