iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Hellstrom via iommu <iommu@lists.linux-foundation.org>
To: "hch@lst.de" <hch@lst.de>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"christian.koenig@amd.com" <christian.koenig@amd.com>
Subject: Re: [PATCH 2/2] dma-mapping: force unencryped devices are always addressing limited
Date: Wed, 27 Nov 2019 18:22:57 +0000	[thread overview]
Message-ID: <a95d9115fc2a80de2f97f001bbcd9aba6636e685.camel@vmware.com> (raw)
In-Reply-To: <20191127144006.25998-3-hch@lst.de>

Hi,

On Wed, 2019-11-27 at 15:40 +0100, Christoph Hellwig wrote:
> Devices that are forced to DMA through unencrypted bounce buffers
> need to be treated as if they are addressing limited.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  kernel/dma/mapping.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c
> index 1dbe6d725962..f6c35b53d996 100644
> --- a/kernel/dma/mapping.c
> +++ b/kernel/dma/mapping.c
> @@ -416,6 +416,8 @@ EXPORT_SYMBOL_GPL(dma_get_merge_boundary);
>   */
>  bool dma_addressing_limited(struct device *dev)
>  {
> +	if (force_dma_unencrypted(dev))
> +		return true;
>  	return min_not_zero(dma_get_mask(dev), dev->bus_dma_limit) <
>  			    dma_get_required_mask(dev);
>  }

Any chance to have the case

(swiotlb_force == SWIOTLB_FORCE)

also included?

Otherwise for the series

Reviewed-by: Thomas Hellström <thellstrom@vmware.com>

 

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2019-11-27 19:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27 14:40 make dma_addressing_limited work for memory encryption setups Christoph Hellwig
2019-11-27 14:40 ` [PATCH 1/2] dma-mapping: move dma_addressing_limited out of line Christoph Hellwig
2019-11-27 17:13   ` Matthew Wilcox
2019-11-27 14:40 ` [PATCH 2/2] dma-mapping: force unencryped devices are always addressing limited Christoph Hellwig
2019-11-27 18:22   ` Thomas Hellstrom via iommu [this message]
2019-11-28  7:51     ` hch
2019-11-28  8:02       ` Thomas Hellstrom via iommu
2019-11-28 15:36         ` hch
2019-12-04 13:03 make dma_addressing_limited work for memory encryption setups v2 Christoph Hellwig
2019-12-04 13:03 ` [PATCH 2/2] dma-mapping: force unencryped devices are always addressing limited Christoph Hellwig
2019-12-06 14:10   ` Thomas Hellstrom via iommu

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=a95d9115fc2a80de2f97f001bbcd9aba6636e685.camel@vmware.com \
    --to=iommu@lists.linux-foundation.org \
    --cc=christian.koenig@amd.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=thellstrom@vmware.com \
    --cc=thomas.lendacky@amd.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;
as well as URLs for NNTP newsgroup(s).