The error can't be fixed by just updating the NVMe driver. The NVMe spec (and as pointed out by Chirstoph, some other drivers) rely on the offset of address to copy data correctly. When data is mapped via swiotlb, the current implementation always copy the data at 2k/4k aligned address.
On Thu, Jan 28, 2021 at 9:35 AM Keith Busch <[email protected]> wrote: > On Thu, Jan 28, 2021 at 12:15:28PM -0500, Konrad Rzeszutek Wilk wrote: > > On Wed, Jan 27, 2021 at 04:38:28PM -0800, Jianxiong Gao wrote: > > > For devices that need to preserve address offset on mapping through > > > swiotlb, this patch adds offset preserving based on page_offset_mask > > > and keeps the offset if the mask is non zero. This is needed for > > > device drivers like NVMe. > > > > <scratches his head> > > > > Didn't you send this patch like a month ago and someone pointed > > out that the right fix would be in the NVMe driver? > > > > Is there an issue with fixing the NVMe driver? > > You got it backwards. The initial "fix" used a flag specific to the nvme > driver, and it was pointed out that it should just be the generic > behaviour. > -- Jianxiong Gao
_______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
