public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <Andrew.Cooper3@citrix.com>
To: Christoph Hellwig <hch@infradead.org>, Juergen Gross <jgross@suse.com>
Cc: "jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Salvatore Bonaccorso <carnil@debian.org>,
	"sathya.prakash@broadcom.com" <sathya.prakash@broadcom.com>,
	"suganath-prabu.subramani@broadcom.com" 
	<suganath-prabu.subramani@broadcom.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"MPT-FusionLinux.pdl@broadcom.com"
	<MPT-FusionLinux.pdl@broadcom.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"adi@kriegisch.at" <adi@kriegisch.at>
Subject: Re: Report in downstream Debian: mpt3sas broken with xen dom0 with update to 5.10.149 in 5.10.y.
Date: Mon, 24 Oct 2022 17:28:05 +0000	[thread overview]
Message-ID: <858a4288-46ac-d423-a529-b3b77b7fbc8a@citrix.com> (raw)
In-Reply-To: <Y1bEQMS5SNTbZO/3@infradead.org>

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

  reply	other threads:[~2022-10-24 18:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21  9:22 Report in downstream Debian: mpt3sas broken with xen dom0 with update to 5.10.149 in 5.10.y Salvatore Bonaccorso
2022-10-23  1:27 ` Bart Van Assche
2022-10-24 11:56   ` Sreekanth Reddy
2022-10-24 12:51     ` James Bottomley
2022-10-24 13:20       ` Juergen Gross
2022-10-24 16:58         ` Christoph Hellwig
2022-10-24 17:28           ` Andrew Cooper [this message]
2022-10-24 17:32             ` Christoph Hellwig
     [not found]             ` <20230314111752.EGroupware.TiNRv1BSroWqKL7zQtfNLJ8@_>
2023-03-14 11:23               ` Juergen Gross
2023-03-14 11:41                 ` Andrew Cooper
2023-03-14 12:07                   ` Salvatore Bonaccorso
2022-10-24 12:55     ` Juergen Gross
2022-10-24 18:50       ` James Bottomley
2022-10-25  4:32         ` Juergen Gross
2022-10-25  6:38       ` Juergen Gross
2022-10-24 14:58     ` Adi Kriegisch
2022-10-24 17:30     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=858a4288-46ac-d423-a529-b3b77b7fbc8a@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=adi@kriegisch.at \
    --cc=bvanassche@acm.org \
    --cc=carnil@debian.org \
    --cc=hch@infradead.org \
    --cc=jejb@linux.ibm.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=suganath-prabu.subramani@broadcom.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox