From: Rijo Thomas <Rijo-john.Thomas@amd.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "Jeremi Piotrowski" <jpiotrowski@linux.microsoft.com>,
"Tom Lendacky" <thomas.lendacky@amd.com>,
"John Allen" <john.allen@amd.com>,
"David S . Miller" <davem@davemloft.net>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org,
"Mythri PK" <Mythri.Pandeshwarakrishna@amd.com>,
Jeshwanth <JESHWANTHKUMAR.NK@amd.com>,
"Devaraj Rangasamy" <Devaraj.Rangasamy@amd.com>,
stable@vger.kernel.org,
"Jens Wiklander" <jens.wiklander@linaro.org>
Subject: Re: [PATCH v2] crypto: ccp - Allocate TEE ring and cmd buffer using DMA APIs
Date: Wed, 4 Jan 2023 11:30:14 +0530 [thread overview]
Message-ID: <9d8e5548-cb5e-ffd7-72e3-b65dbcf74938@amd.com> (raw)
In-Reply-To: <Y66gTtjZf5ZT0lP0@gondor.apana.org.au>
On 12/30/2022 1:54 PM, Herbert Xu wrote:
> On Fri, Dec 23, 2022 at 05:45:24PM +0530, Rijo Thomas wrote:
>>
>>> dma_alloc_coherent memory is just as contiguous as __get_free_pages, and
>>> calling dma_alloc_coherent from a guest does not guarantee that the memory is
>>> contiguous in host memory either. The memory would look contiguous from the
>>> device point of view thanks to the IOMMU though (in both cases). So this is not
>>> about being contiguous but other properties that you might rely on (dma mask
>>> most likely, or coherent if you're not running this on x86?).
>>>
>>> Can you confirm why this fixes things and update the comment to reflect that.
>>
>> I see what you are saying.
>>
>> We verified this in Xen Dom0 PV guest, where dma_alloc_coherent() returned a memory
>> that is contiguous in machine address space, and the machine address was returned
>> in the dma handle (buf->dma).
>
> So is this even relevant to the mainstream kernel or is this patch
> only needed for Xen Dom0?
>
> Thanks,
Herbert,
This patch is no longer relevant to the mainstream kernel.
Thanks,
Rijo
prev parent reply other threads:[~2023-01-04 6:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-13 11:10 [PATCH v2] crypto: ccp - Allocate TEE ring and cmd buffer using DMA APIs Rijo Thomas
2022-12-15 13:29 ` Jeremi Piotrowski
2022-12-16 17:48 ` Alex Deucher
2022-12-23 12:15 ` Rijo Thomas
2022-12-30 8:24 ` Herbert Xu
2023-01-04 6:00 ` Rijo Thomas [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=9d8e5548-cb5e-ffd7-72e3-b65dbcf74938@amd.com \
--to=rijo-john.thomas@amd.com \
--cc=Devaraj.Rangasamy@amd.com \
--cc=JESHWANTHKUMAR.NK@amd.com \
--cc=Mythri.Pandeshwarakrishna@amd.com \
--cc=christian.koenig@amd.com \
--cc=davem@davemloft.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=herbert@gondor.apana.org.au \
--cc=jens.wiklander@linaro.org \
--cc=john.allen@amd.com \
--cc=jpiotrowski@linux.microsoft.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
--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