Andreas Economides 93db90f7f3 nvmf/vfio-user: fix SQ race condition
The host driver should do a wmb() before it updates the SQ tail doorbell
to ensure that any writes to the SQ are guaranteed to be visible if a
doorbell update is visible (a store-release) - and indeed, this is what
the Linux NVMe driver does.

Therefore, we require a rmb() after we read the tail doorbell in order
to synchronise properly with the host driver (we need a load-acquire),
and guarantee that the updates to the SQ are visisble to us.

Signed-off-by: Andreas Economides <andreas.economides@nutanix.com>
Change-Id: I57eb1e1f0dfb1091a8f10f40f8ee0e2604d9268c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9514
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-09-20 10:48:22 +00:00
..
2021-02-05 14:43:47 +00:00
2021-08-20 07:26:10 +00:00
2021-07-13 08:57:58 +00:00
2021-02-05 14:43:47 +00:00
2021-09-03 08:08:20 +00:00
2021-02-05 14:43:47 +00:00
2021-06-22 23:42:02 +00:00
2021-09-02 07:43:37 +00:00
2021-08-20 07:26:10 +00:00