mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krishna Reddy <vdumpa@nvidia.com>
To: Robin Murphy <robin.murphy@arm.com>, Joerg Roedel <joro@8bytes.org>
Cc: "iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] iommu/dma: limit the IOVA allocated to dma-ranges region
Date: Fri, 8 Sep 2017 18:12:42 +0000	[thread overview]
Message-ID: <013c5c072747482fb737b61e1e468f91@HQMAIL107.nvidia.com> (raw)
In-Reply-To: <a4b09f0f-bde4-d999-b041-370c9bf26a38@arm.com>

>OK, so that's really just another variant of the existing problem we have with certain PCI root complexes with restrictive inbound windows.
>The appropriate way to handle that is to reserve the unusable areas of the IOVA space up-front.
> Since the support for the ACPI equivalent of "dma-ranges" has just landed, this is now pretty much top of my to-do-list for
> the upcoming cycle (there's various things still to fix in the DT code, but that's essentially part of the same job).

Reserving upfront would work. If you already have in it in to-do-list, we will wait for your patches.

>In the case of a 64-bit-capable IP block with only 34 bits of address wired up externally, if that 34-bit interconnect is described by "dma-ranges"
> then the device will already be created with an appropriate 34-bit DMA mask. The fact that the driver can stomp on that with a 64-bit mask later 
>is entirely down to the implementations of
>dma_set_mask() etc. (I've had a patch to restrict masks for arm64 for a while, but I worry that it carries quite a high risk of breakage in default cases).

Exactly, It is the stomping issue. dma-ranges code updates the mask earlier than sdhci code. Sdhci code is overwriting the dma mask afterwards.

-KR

      reply	other threads:[~2017-09-08 18:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 22:08 Krishna Reddy
2017-09-01  9:26 ` Joerg Roedel
2017-09-01  9:43   ` Robin Murphy
2017-09-05 17:35     ` Krishna Reddy
2017-09-08 14:12       ` Robin Murphy
2017-09-08 18:12         ` Krishna Reddy [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=013c5c072747482fb737b61e1e468f91@HQMAIL107.nvidia.com \
    --to=vdumpa@nvidia.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    /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

all inboxes | Powered by JetHome®