public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst•de>
To: Robin Murphy <robin.murphy@arm•com>
Cc: andmike@us•ibm.com, sukadev@linux•vnet.ibm.com,
	mdroth@linux•vnet.ibm.com, b.zolnierkie@samsung•com,
	jasowang@redhat•com, aik@linux•ibm.com,
	Ram Pai <linuxram@us•ibm.com>,
	linux-kernel@vger•kernel.org,
	virtualization@lists•linux-foundation.org,
	iommu@lists•linux-foundation.org, paul.burton@mips•com,
	m.szyprowski@samsung•com, linuxppc-dev@lists•ozlabs.org,
	hch@lst•de, David Gibson <david@gibson•dropbear.id.au>
Subject: Re: [PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr()
Date: Tue, 15 Oct 2019 09:31:04 +0200	[thread overview]
Message-ID: <20191015073104.GA32252@lst.de> (raw)
In-Reply-To: <37609731-5539-b906-aa94-2ef0242795ac@arm.com>

On Mon, Oct 14, 2019 at 11:29:24AM +0100, Robin Murphy wrote:
>> However, I would like to see the commit message (and maybe the inline
>> comments) expanded a bit on what the distinction here is about.  Some
>> of the text from the next patch would be suitable, about DMA addresses
>> usually being in a different address space but not in the case of
>> bounce buffering.
>
> Right, this needs a much tighter definition. "DMA address happens to be a 
> valid physical address" is true of various IOMMU setups too, but I can't 
> believe it's meaningful in such cases.
>
> If what you actually want is "DMA is direct or SWIOTLB" - i.e. "DMA address 
> is physical address of DMA data (not necessarily the original buffer)" - 
> wouldn't dma_is_direct() suffice?

It would.  But drivers have absolutely no business knowing any of this.

  parent reply	other threads:[~2019-10-15  7:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-12  1:25 [PATCH 0/2] virtio: Support encrypted memory on powerpc secure guests Ram Pai
2019-10-12  1:25 ` [PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr() Ram Pai
2019-10-12  1:25   ` [PATCH 2/2] virtio_ring: Use DMA API if memory is encrypted Ram Pai
2019-10-14  4:52     ` David Gibson
2019-10-15  7:35     ` Christoph Hellwig
2019-10-16  7:55       ` Ram Pai
2019-10-17  2:33       ` Jason Wang
2019-10-21  8:36       ` David Gibson
2019-10-14  4:51   ` [PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr() David Gibson
2019-10-14 10:29     ` Robin Murphy
2019-10-15  7:30       ` Ram Pai
2019-10-15  7:31       ` Christoph Hellwig [this message]
2019-10-12  1:36 ` [PATCH 0/2] virtio: Support encrypted memory on powerpc secure guests Ram Pai

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=20191015073104.GA32252@lst.de \
    --to=hch@lst$(echo .)de \
    --cc=aik@linux$(echo .)ibm.com \
    --cc=andmike@us$(echo .)ibm.com \
    --cc=b.zolnierkie@samsung$(echo .)com \
    --cc=david@gibson$(echo .)dropbear.id.au \
    --cc=iommu@lists$(echo .)linux-foundation.org \
    --cc=jasowang@redhat$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=linuxram@us$(echo .)ibm.com \
    --cc=m.szyprowski@samsung$(echo .)com \
    --cc=mdroth@linux$(echo .)vnet.ibm.com \
    --cc=paul.burton@mips$(echo .)com \
    --cc=robin.murphy@arm$(echo .)com \
    --cc=sukadev@linux$(echo .)vnet.ibm.com \
    --cc=virtualization@lists$(echo .)linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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