Re: [PATCH] vhost: fix vring addr update with vDPA

2024-03-13 Thread David Marchand
On Thu, Mar 7, 2024 at 11:35 AM David Marchand wrote: > > For vDPA devices, vq are not locked once the device has been configured > at runtime. > > On the other hand, we need to hold the vq lock to evaluate vq->access_ok, > invalidate vring addresses and translate them. > > Move vring address upda

Re: [PATCH] vhost: fix vring addr update with vDPA

2024-03-11 Thread Maxime Coquelin
On 3/7/24 11:34, David Marchand wrote: For vDPA devices, vq are not locked once the device has been configured at runtime. On the other hand, we need to hold the vq lock to evaluate vq->access_ok, invalidate vring addresses and translate them. Move vring address update earlier and, when vDPA

[PATCH] vhost: fix vring addr update with vDPA

2024-03-07 Thread David Marchand
For vDPA devices, vq are not locked once the device has been configured at runtime. On the other hand, we need to hold the vq lock to evaluate vq->access_ok, invalidate vring addresses and translate them. Move vring address update earlier and, when vDPA is configured, skip parts which expect lock

Re: [PATCH] vhost: fix vring addr update with vDPA

2024-03-05 Thread David Marchand
On Tue, Mar 5, 2024 at 10:13 AM David Marchand wrote: > > For vDPA devices, vq are not locked once the device has been configured > at runtime. > > On the other hand, we need to hold the vq lock to evaluate vq->access_ok, > invalidate vring addresses and translate them. > > Move vring address upda

[PATCH] vhost: fix vring addr update with vDPA

2024-03-05 Thread David Marchand
For vDPA devices, vq are not locked once the device has been configured at runtime. On the other hand, we need to hold the vq lock to evaluate vq->access_ok, invalidate vring addresses and translate them. Move vring address update earlier and, when vDPA is configured, skip parts which expect lock