All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Chen Baozi <cbz@baozis.org>,
	julien.grall@linaro.org, xen-devel@lists.xen.org
Subject: Re: Question about DMA on 1:1 mapping dom0 of arm64
Date: Fri, 17 Apr 2015 15:46:40 +0100	[thread overview]
Message-ID: <1429282000.25195.344.camel@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1504171532510.7690@kaball.uk.xensource.com>

On Fri, 2015-04-17 at 15:34 +0100, Stefano Stabellini wrote:
> > > If I set dom0_mem to a small value (e.g. 512M), which makes all physical memory
> > > of dom0 below 4G, everything goes fine.
> > 
> > So you are getting allocated memory below 4G?
> > 
> > You message on IRC suggested you weren't, did you hack around this?
> > 
> > I think we have two options, either xen_swiotlb_init allocates pages
> > below 4GB (e.g. __GFP_DMA) or we do something to allow xen_swiotlb_fixup
> > to actually work even on a 1:1 dom0.
> 
> I don't think that making xen_swiotlb_fixup work on ARM is a good idea:
> it would break the 1:1.

This would actually work though, I think, because this is the swiotlb so
we definitely have the opportunity to return the actual DMA address
whenever we use this buffer and the device will use it in the right
places for sure.

The swiotlb buffer can't ever get reused for anything else so we don't
even need to worry about undoing the damage later.

> > Although the first option seems preferable at first glance it has the
> > short coming that it requires dom0 to have some memory below 4GB, which
> > might not necessarily be the case.
> 
> I think we should arrange dom0 to get some memory under 4G to begin
> with, not necessarily all of it.

It's another option for sure, the question is how to decide how much,
and how to make it configurable etc.

Ian.

  reply	other threads:[~2015-04-17 14:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 11:24 Question about DMA on 1:1 mapping dom0 of arm64 Chen Baozi
2015-04-17 13:21 ` Ian Campbell
2015-04-17 14:34   ` Stefano Stabellini
2015-04-17 14:46     ` Ian Campbell [this message]
2015-04-17 16:13       ` Stefano Stabellini
2015-04-17 16:31         ` Ian Campbell
2015-04-18  9:08         ` Chen Baozi
2015-04-18  9:23           ` Chen Baozi
2015-04-20  9:00             ` Ian Campbell
2015-04-20  9:58           ` Stefano Stabellini
2015-04-20 10:11             ` Ian Campbell
2015-04-20 10:38               ` Stefano Stabellini
2015-04-20 11:11                 ` Ian Campbell
2015-04-20 17:28                   ` Stefano Stabellini
2015-04-20 10:46             ` Chen Baozi
2015-04-17 16:41   ` Chen Baozi
2015-04-20  9:07     ` Ian Campbell
2015-04-17 14:32 ` Stefano Stabellini
2015-04-17 14:38   ` Ian Campbell
2015-04-18  6:56   ` Chen Baozi
2015-04-18  8:29   ` Chen Baozi

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=1429282000.25195.344.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=cbz@baozis.org \
    --cc=julien.grall@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.