* iommu non-strict mode for arm64
@ 2022-02-04 5:46 Josh Poimboeuf
2022-02-04 12:35 ` Robin Murphy
0 siblings, 1 reply; 2+ messages in thread
From: Josh Poimboeuf @ 2022-02-04 5:46 UTC (permalink / raw)
To: Robin Murphy, Joerg Roedel, Will Deacon, iommu; +Cc: linux-kernel
Hi all,
We've gotten significant slowdowns on arm64 with 4k pages compared to
64k. The slowdowns can be alleviated by setting iommu.strict=0 or
iommu.passthrough=1.
Is there a reason x86 defaults to lazy iommu, while arm64 does not? Are
there security implications which are specific to arm64?
--
Josh
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: iommu non-strict mode for arm64
2022-02-04 5:46 iommu non-strict mode for arm64 Josh Poimboeuf
@ 2022-02-04 12:35 ` Robin Murphy
0 siblings, 0 replies; 2+ messages in thread
From: Robin Murphy @ 2022-02-04 12:35 UTC (permalink / raw)
To: Josh Poimboeuf, Joerg Roedel, Will Deacon, iommu; +Cc: linux-kernel
On 2022-02-04 05:46, Josh Poimboeuf wrote:
> Hi all,
>
> We've gotten significant slowdowns on arm64 with 4k pages compared to
> 64k. The slowdowns can be alleviated by setting iommu.strict=0 or
> iommu.passthrough=1.
>
> Is there a reason x86 defaults to lazy iommu, while arm64 does not? Are
> there security implications which are specific to arm64?
The x86 behaviour is basically 2 decades of legacy where nobody now
feels brave enough to flip the default. At the time the arm64 IOMMU DMA
ops were first added, strict mode was the only thing feasible to
implement, but there was also a conscious consideration that having a
default assumption of "IOMMU == more protection" wasn't a bad thing
anyway. Given what played out a couple of years later, and everyone now
being that much more security-aware, I think that decision has only been
reinforced.
Passthrough and non-strict mode in iommu-dma only came along later, and
most IOMMU drivers for arm64 still don't support them, which is another
reason I'm still against changing the default today. However, if you're
confident that your arm64 users care more about high-bandwidth I/O
throughput than memory protection then feel free to set
IOMMU_DEFAULT_DMA_LAZY or IOMMU_DEFAULT_PASSTHROUGH in your config.
Cheers,
Robin.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-04 12:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-04 5:46 iommu non-strict mode for arm64 Josh Poimboeuf
2022-02-04 12:35 ` Robin Murphy
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®