[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <858a4288-46ac-d423-a529-b3b77b7fbc8a@citrix.com>
Date: Mon, 24 Oct 2022 17:28:05 +0000
From: Andrew Cooper <Andrew.Cooper3@...rix.com>
To: Christoph Hellwig <hch@...radead.org>,
Juergen Gross <jgross@...e.com>
CC: "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
Sreekanth Reddy <sreekanth.reddy@...adcom.com>,
Bart Van Assche <bvanassche@....org>,
Salvatore Bonaccorso <carnil@...ian.org>,
"sathya.prakash@...adcom.com" <sathya.prakash@...adcom.com>,
"suganath-prabu.subramani@...adcom.com"
<suganath-prabu.subramani@...adcom.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
"MPT-FusionLinux.pdl@...adcom.com" <MPT-FusionLinux.pdl@...adcom.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
"adi@...egisch.at" <adi@...egisch.at>
Subject: Re: Report in downstream Debian: mpt3sas broken with xen dom0 with
update to 5.10.149 in 5.10.y.
On 24/10/2022 17:58, Christoph Hellwig wrote:
> On Mon, Oct 24, 2022 at 03:20:43PM +0200, Juergen Gross wrote:
>> Dom0 is (normally) a PV domain, so the physical memory can be still above
>> 4 GB even with dom0_mem set to 4GB.
> Which means that we need to ensure the DMA ops for Xen-PV (which is
> always xen-swiotlb I think?) need to return DMA_BIT_MASK(64) or whatever
> is the highest possible address.
Xen tries to allocate memory from the top down, in order to keep the low
memory free for special purses. (32bit PV guests strictly need to live
below the 128G boundary in host physical space for ABI reasons, and
Xen's struct vcpu needs to be below the 4G boundary for compatibility
with some processors.)
This means that a 64bit PV dom0 ends up occupying the highest addresses
in RAM. Naturally, this is a problem for devices which can't do 64bit DMA.
The xen-swiotlb is a region (default 128M iirc) which dom0 requests of
Xen during startup. It is below the 4G boundary, and physically
contiguous (unlike most of the rest of PV guest memory).
Hence it's a suitable bounce buffer for any 32-bit-only devices.
I don't know exactly how this translates to Linux internals, but most
devices are fine and it's routinely the mpt2/3sas drivers which
encounter problems. It would be lovely if we could get to the bottom of
this for once and for all.
~Andrew
Powered by blists - more mailing lists