All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>
Cc: edgar.iglesias@xilinx.com,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	tim@xen.org, stefano.stabellini@citrix.com,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v4 0/3] Set SMMU s2 input-size based on p2m tables
Date: Wed, 6 May 2015 12:50:29 +0100	[thread overview]
Message-ID: <1430913029.2660.262.camel@citrix.com> (raw)
In-Reply-To: <5549F5C3.3020200@citrix.com>

On Wed, 2015-05-06 at 12:06 +0100, Julien Grall wrote:
> Hi Ian,
> 
> On 06/05/15 10:39, Ian Campbell wrote:
> > On Wed, 2015-05-06 at 19:17 +1000, Edgar E. Iglesias wrote:
> >>> Right, it seems like we may eventually need to introduce the possibility
> >>> of not sharing the p2m depending on the circumstances as is done on x86.
> 
> I'd like to avoid non-share P2M as much as possible. It would also not
> help in the situation where bits(SMMU) < bits(MMU-s2), at least in case
> of DOM0.
> 
> For DOM0 with direct memory mapping (currently the default), every grant
> table page are also mapped 1:1 in order to use them in DMA requests.
> This is because dev_bus_addr return by the hypercall is the MFN (not the
> IPA).
> 
> The direct memory mapping could only be dropped if all the devices using
> DMA are protected by an SMMU.

Correct, I was talking mainly about the case where we would otherwise be
able to drop the mapping, i.e. everything protected (IOW "RAM completely
covered" is a special case of "protected device").

> > For dom0 it's a bit trickier, but I think the answer is basically that
> > on systems with insufficiently large SMMU support and peripherals or RAM
> > above the SMMU's limit we wouldn't be able to take advantage of the SMMU
> > protections and would be stuck with e.g. 1:1 mode. If it was only RAM
> > and not peripherals up high then perhaps we could trade off use of SMMU
> > vs dom0 RAM size.
> 
> See a possible problem above. I think we would have to boot DOM0 without
> SMMU protection.

Right, I was thinking mainly of the non-1:1 SMMU is completely used
case.

> Although, given the complexity of the implementation, I would wait any
> feedback from AMD before considering to add SMMU support for platform
> where the SMMU handle less address bits than the MMU.

Agreed.

Ian.

      reply	other threads:[~2015-05-06 11:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-01  1:40 [PATCH v4 0/3] Set SMMU s2 input-size based on p2m tables Edgar E. Iglesias
2015-05-01  1:40 ` [PATCH v4 1/3] xen/arm: Re-order iommu_setup to after setup_virt_paging Edgar E. Iglesias
2015-05-05 13:18   ` Ian Campbell
2015-05-01  1:40 ` [PATCH v4 2/3] xen/arm: Add p2m_ipa_bits Edgar E. Iglesias
2015-05-05 13:23   ` Ian Campbell
2015-05-06  4:28     ` Edgar E. Iglesias
2015-05-01  1:40 ` [PATCH v4 3/3] xen/iommu: arm: Use p2m_ipa_bits as stage2 input size Edgar E. Iglesias
2015-05-01 10:22   ` Julien Grall
2015-05-05 13:24   ` Ian Campbell
2015-05-05 13:48     ` Julien Grall
2015-05-05 13:59       ` Ian Campbell
2015-05-05 14:30         ` Julien Grall
2015-05-06  5:32           ` Edgar E. Iglesias
2015-05-05 13:17 ` [PATCH v4 0/3] Set SMMU s2 input-size based on p2m tables Ian Campbell
2015-05-05 13:45   ` Julien Grall
2015-05-06  3:26   ` Edgar E. Iglesias
2015-05-06  8:54     ` Ian Campbell
2015-05-06  9:17       ` Edgar E. Iglesias
2015-05-06  9:39         ` Ian Campbell
2015-05-06 11:06           ` Julien Grall
2015-05-06 11:50             ` Ian Campbell [this message]

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=1430913029.2660.262.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=julien.grall@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --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.