Report in downstream Debian: mpt3sas broken with xen dom0 with update to 5.10.149 in 5.10.y.

From: Salvatore Bonaccorso
Date: Fri Oct 21 2022 - 05:22:34 EST


Hi,

We got the following report in Debian after an update from 5.10.140 to
the current 5.10.149. Full quoting below (from
https://bugs.debian.org/1022126). Does this ring some bell about known
regressions?
On Thu, Oct 20, 2022 at 05:21:03PM +0200, Adi Kriegisch wrote:
> Package: linux-image-5.10.0-19-amd64
> Version: 5.10.149-1
> Severity: important
>
> Dear maintainers,
>
> with the upgrade to the latest bullseye kernel (5.10.149-1), our xen setup
> is unbootable due to swiotlb buffer errors:
> | sd 0:0:0:0: scsi_dma_map failed: request for 401408 bytes!
> and
> | mpt3sas 0000:01:00.0: swiotlb buffer is full (sz: 401408 bytes),
> | total 32768 (slots), used 0 (slots)
> (the byte sizes vary between boots).
>
> After reading bug #850425[1], we also tried to force 32bit mode in the
> mpt3sas driver by specifying a dom0 memory below 4G; this lets the machine
> boot, but almost immediately after that fails with the same error. Notable
> difference is that the used slots are 128.
>
> Xen commandline:
> dom0_mem=4096M,max:4096M dom0_max_vcpus=4 dom0_vcpus_pin
> ucode=scan xpti=dom0=false,domu=true gnttab_max_frames=128
>
> Using dom0-iommu=map-inclusive in some combinations with swiotlb on the
> kernel commandline gives us some used slots (way below 128) in the error
> message even in 64bit dma mode in the mpt3sas driver.
>
> The kernel works when booted without xen. We'd be more than happy to get
> pointers on how to fix that issue or patches to test!
>
> Thanks for your help!
>
> -- Adi
>
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850425

Regards,
Salvatore