From: Robin Murphy <robin.murphy@arm.com>
To: Christoph Hellwig <hch@lst.de>
Cc: michael.jamet@intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, YehezkelShB@gmail.com,
iommu@lists.linux-foundation.org, mario.limonciello@amd.com,
andreas.noever@gmail.com, mika.westerberg@linux.intel.com
Subject: Re: [PATCH v2 1/2] iommu: Add capability for pre-boot DMA protection
Date: Tue, 22 Mar 2022 09:53:29 +0000 [thread overview]
Message-ID: <3e715fb9-7a0d-046a-c32c-bc6afbecf55e@arm.com> (raw)
In-Reply-To: <20220322091432.GA27069@lst.de>
On 2022-03-22 09:14, Christoph Hellwig wrote:
> On Fri, Mar 18, 2022 at 05:42:57PM +0000, Robin Murphy wrote:
>> VT-d's dmar_platform_optin() actually represents a combination of
>> properties fairly well standardised by Microsoft as "Pre-boot DMA
>> Protection" and "Kernel DMA Protection"[1]. As such, we can provide
>> interested consumers with an abstracted capability rather than
>> driver-specific interfaces that won't scale. We name it for the former
>> aspect since that's what external callers are most likely to be
>> interested in; the latter is for the IOMMU layer to handle itself.
>>
>> Also use this as an opportunity to draw a line in the sand and add a
>> new interface so as not to introduce any more callers of iommu_capable()
>> which I also want to get rid of. For now it's a quick'n'dirty wrapper
>> function, but will evolve to subsume the internal interface in future.
>>
>> [1] https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-kernel-dma-protection
>>
>> Suggested-by: Christoph Hellwig <hch@lst.de>
>> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
>
> I can't really think of a way in which I suggested this, but it does
> looks like a good interface:
Well, you were the first to say it should be abstracted[1], and since my
initial thought that it could be hidden completely didn't pan out, I
felt I should give you credit for being right all along :)
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Thanks!
Robin.
[1] https://lore.kernel.org/linux-iommu/YjDDUUeZ%2FdvUZoDN@infradead.org/
next prev parent reply other threads:[~2022-03-22 9:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 17:42 [PATCH v2 0/2] thunderbolt: Make iommu_dma_protection more accurate Robin Murphy
2022-03-18 17:42 ` [PATCH v2 1/2] iommu: Add capability for pre-boot DMA protection Robin Murphy
2022-03-22 9:14 ` Christoph Hellwig
2022-03-22 9:53 ` Robin Murphy [this message]
2022-03-18 17:42 ` [PATCH v2 2/2] thunderbolt: Make iommu_dma_protection more accurate Robin Murphy
2022-03-18 22:29 ` Limonciello, Mario
2022-03-21 10:58 ` mika.westerberg
2022-03-21 11:11 ` Robin Murphy
2022-03-21 13:21 ` Limonciello, Mario
2022-03-22 9:16 ` Christoph Hellwig
2022-03-22 11:41 ` Mika Westerberg
2022-03-22 14:40 ` Robin Murphy
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=3e715fb9-7a0d-046a-c32c-bc6afbecf55e@arm.com \
--to=robin.murphy@arm.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.intel.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).