Re: [PATCH untested] vhost: order avail ring reads after index updates

2024-03-27 Thread Michael S. Tsirkin
On Wed, Mar 27, 2024 at 07:52:02PM +, Will Deacon wrote: > On Wed, Mar 27, 2024 at 01:26:23PM -0400, Michael S. Tsirkin wrote: > > vhost_get_vq_desc (correctly) uses smp_rmb to order > > avail ring reads after index reads. > > However, over time we added two more places that read the > > index

Re: [PATCH untested] vhost: order avail ring reads after index updates

2024-03-27 Thread Will Deacon
On Wed, Mar 27, 2024 at 01:26:23PM -0400, Michael S. Tsirkin wrote: > vhost_get_vq_desc (correctly) uses smp_rmb to order > avail ring reads after index reads. > However, over time we added two more places that read the > index and do not bother with barriers. > Since vhost_get_vq_desc when it was

[PATCH untested] vhost: order avail ring reads after index updates

2024-03-27 Thread Michael S. Tsirkin
vhost_get_vq_desc (correctly) uses smp_rmb to order avail ring reads after index reads. However, over time we added two more places that read the index and do not bother with barriers. Since vhost_get_vq_desc when it was written assumed it is the only reader when it sees a new index value is