xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Elliott Mitchell <ehem+xen@m5p.com>, Corey Minyard <minyard@acm.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Roman Shaposhnik <roman@zededa.com>,
	jeff.kubascik@dornerworks.com,
	Julien Grall <julien.grall@arm.com>,
	xen-devel@lists.xenproject.org,
	Stefano Stabellini <stefano.stabellini@xilinx.com>
Subject: Re: Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU
Date: Sat, 2 May 2020 20:43:53 +0100	[thread overview]
Message-ID: <00800979-6202-b2c1-7e1f-d05184d187a6@xen.org> (raw)
In-Reply-To: <20200502184836.GA96674@mattapan.m5p.com>

Hi Elliott,

On 02/05/2020 19:48, Elliott Mitchell wrote:
> On Sat, May 02, 2020 at 12:35:29PM -0500, Corey Minyard wrote:
>> On Sat, May 02, 2020 at 12:46:14PM +0100, Julien Grall wrote:
>>>
>>> On 02/05/2020 03:16, Corey Minyard wrote:
>>>>
>>>> Nope.  If you say 4096M of RAM, your issue is almost certainly DMA, but
>>>> it's not (just) the Linux code.  On the Raspberry Pi 4, several devices
>>>> cannot DMA to above 1024M of RAM, but Xen does not handle this.  The
>>>> 1024M of RAM is a limitation you will have to live with until Xen has a
>>>> fix.
>>>
>>> IIUC, dom0 would need to have some memory below 1GB for this to work, am I
>>> correct?
>>
>> No.  If I am understanding this correctly, all the memory in dom0 below
>> 1GB would have to be physically below 1GB.
>>
>> The Linux patch set starts at:
>>
>> https://lore.kernel.org/linux-iommu/20191015174616.GO13874@arrakis.emea.arm.com/t/
>>
> 
> Actually, things get worse.  What if someone wants to run an X-server in
> DomU and have a DomU accessing the graphics hardware?  Really needs to be
> a case of allocating DMA-capable memory means talking to Xen.

I am confused, if you passthrough a device to your DomU then you most 
likely going to want to protect using an IOMMU. So are you talking with 
or without IOMMU?

Lets imagine that you want to do without an IOMMU. The easiest way would 
be to direct-map your domain (e.g host physical == guest physical) 
because you require no modification in your guest. Only the toolstack 
and Xen would require modification.

Stefano has been working on a solution in the dom0less case (see [1]). 
The approach is to let the user select the region of RAM to use for a 
given guest.


> As pointed out in that discussion different boards are going to have the
> DMA-borderline in different places.  There could be enough variation that
> it needs to be settable at run time.  Then some boards might have some
> DMA devices which can access all memory, and some which cannot (full-DMA
> versus limited-DMA?).
> 
> 

Cheers,

[1] 
https://lore.kernel.org/xen-devel/91b9d1d9-6e6f-c8b9-55ac-a3477b20a17b@xen.org/T/#t

-- 
Julien Grall


  reply	other threads:[~2020-05-02 19:44 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01  2:20 Troubles running Xen on Raspberry Pi 4 with 5.6.1 DomU Roman Shaposhnik
2020-05-01 11:42 ` Corey Minyard
2020-05-02  1:06   ` Roman Shaposhnik
2020-05-02  2:16     ` Corey Minyard
2020-05-02 11:46       ` Julien Grall
2020-05-02 17:35         ` Corey Minyard
2020-05-02 17:48           ` Julien Grall
2020-05-04 12:44             ` Corey Minyard
2020-05-04 20:54               ` Roman Shaposhnik
2020-05-05  3:52                 ` Stefano Stabellini
2020-05-05  5:36                   ` Roman Shaposhnik
2020-05-05 22:34                     ` Stefano Stabellini
2020-05-06  1:25                       ` Boris Ostrovsky
2020-05-06  4:19                       ` Roman Shaposhnik
2020-05-06  5:41                       ` Jürgen Groß
2020-05-06  8:54                         ` Peng Fan
2020-05-06 13:08                           ` Nataliya Korovkina
2020-05-06 13:42                             ` Boris Ostrovsky
2020-05-06 16:14                               ` Nataliya Korovkina
2020-05-06 17:34                                 ` Stefano Stabellini
2020-05-06 21:12                                   ` Roman Shaposhnik
2020-05-13  0:33                                     ` Stefano Stabellini
2020-05-13 10:11                                       ` Julien Grall
2020-05-13 15:11                                         ` Stefano Stabellini
2020-05-13 18:19                                           ` Julien Grall
2020-05-13 18:26                                             ` Julien Grall
2020-05-13 19:51                                               ` Stefano Stabellini
2020-06-02 18:34                                                 ` Corey Minyard
2020-06-02 19:24                                                   ` Stefano Stabellini
2020-06-03 15:29                                                     ` Corey Minyard
2020-06-03 15:37                                                       ` Stefano Stabellini
2020-06-03 19:49                                                         ` Corey Minyard
2020-06-03 19:55                                                         ` Roman Shaposhnik
2020-05-13 19:13                                             ` Roman Shaposhnik
2020-05-13 19:49                                             ` Stefano Stabellini
2020-05-06 17:35                                 ` Boris Ostrovsky
2020-05-06 21:10                                   ` Roman Shaposhnik
2020-05-06 17:16                           ` Stefano Stabellini
2020-05-06 17:32                         ` Stefano Stabellini
2020-05-02 18:48           ` Elliott Mitchell
2020-05-02 19:43             ` Julien Grall [this message]
2020-05-06 13:48         ` Corey Minyard
2020-05-06 13:56           ` Julien Grall
2020-05-02  0:05 ` Stefano Stabellini
2020-05-02  1:12   ` Roman Shaposhnik

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=00800979-6202-b2c1-7e1f-d05184d187a6@xen.org \
    --to=julien@xen.org \
    --cc=ehem+xen@m5p.com \
    --cc=jeff.kubascik@dornerworks.com \
    --cc=julien.grall@arm.com \
    --cc=minyard@acm.org \
    --cc=roman@zededa.com \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@xilinx.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;
as well as URLs for NNTP newsgroup(s).