[PATCH v3 RESEND] nvme: avoid cqe corruption when update at the same time as read
Marta Rybczynska
mrybczyn at kalray.eu
Tue Mar 22 08:04:43 PDT 2016
----- Mail original -----
> Make sure the CQE phase (validity) is read before the rest of the
> structure. The phase bit is the highest address and the CQE
> read will happen on most platforms from lower to upper addresses
> and will be done by multiple non-atomic loads. If the structure
> is updated by PCI during the reads from the processor, the
> processor may get a corrupted copy.
>
> The addition of the new nvme_cqe_valid function that verifies
> the validity bit also allows refactoring of the other CQE read
> sequences.
This is a resend after a week of testing. Works fine for me.
Regards,
Marta Rybczynska
More information about the Linux-nvme
mailing list