vhost: enforce desc flags and content read ordering
vhost: enforce desc flags and content read ordering

A read barrier is required to ensure that the ordering between
descriptor's flags and content reads is enforced.

1. read flags = desc->flags
if (flags & AVAIL_BIT)
2.   read desc->id

There is a control dependency between steps 1 and step 2.
2 could be speculatively executed before 1, which could result
in 'id' to not be updated yet.

Fixes: 2f3225a7d69b ("vhost: add vector filling support for packed ring")
Cc: stable@dpdk.org

Reported-by: Jason Wang <808efd45667dbd241e4e026b5673172419ecb43e@redhat.com>
Signed-off-by: Maxime Coquelin <9a2667dee3b90866bbc9c2696cff2b7d5616c95a@redhat.com>
Acked-by: Ilya Maximets <e6f59449982e74b9a8013e88011af79c397f66d7@samsung.com>
Acked-by: Michael S. Tsirkin <255103e50249e3d658441816e0597170ebfc16ef@redhat.com>
Acked-by: Tiwei Bie <f338cf29d7d69ff1bc99f755ebfb0eb0accd409e@intel.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk