Re: [PATCH 09/12] dma-direct: remove __dma_to_phys

From: Christoph Hellwig
Date: Fri Sep 11 2020 - 03:14:40 EST


On Thu, Sep 10, 2020 at 02:26:03PM +0100, Robin Murphy wrote:
> On 2020-09-08 17:47, Christoph Hellwig wrote:
>> There is no harm in just always clearing the SME encryption bit, while
>> significantly simplifying the interface.
>
> After a 10-minute diversion into "but hang on, force_dma_unencrypted() is
> meaningful on PPC and S390 too..." before realising that it all does just
> come back to __sme_clr(), which is indeed a no-op for everyone other than
> AMD, any simplification of this mess is indeed welcome :)
>
> Unless I've massively misunderstood how SME is supposed to work,

Exactly. This weird encryption bit in AMD SME causes all kinds of harm,
and I'm glad no one picked it up. I've also been wondering if we
should change the interface to explicit set/clear the bit, but I'll
leave that for another pass as fixing up the SME interfaces would turn
into a massive disgression.