Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp73929pxk; Fri, 11 Sep 2020 00:16:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxese/v9ojUmqgvs6a+e4rYbtvqASeYgLLA0+1ZWew0rlW3h62Ax7bEutAQCuqi2HxWZZK6 X-Received: by 2002:a50:84e8:: with SMTP id 95mr589946edq.99.1599808561553; Fri, 11 Sep 2020 00:16:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599808561; cv=none; d=google.com; s=arc-20160816; b=Fq3Djpo5SALwVZjpVZNSBYaooJKIt+XfVZuroiy2fSYgwVFPhwKGXUzuJPQey9Litq rpL88O5jSX6bJOCQEl5rkOt79qyiEwDnp57GheH6YZrsv3zDdYne4sx2Pb7UTNPgBviU xOPHAI8NShpYZLcReMsArKQmV6IB2nWDm3VIj8JrqfDFswXf9I6P7490nhe00/bMNsqj pzmw4OryCD4HUTiUnEbS/H+Z6WMHwvB6fjf64i8Oscl76Wl/Atl3St8h+KJNI51m+wPp UdVnLqTSGXEIyGl9Lj/qQC/70r5GkmMVhg3boBc1HKNIS1ceOQhdPhVRU4vd9nfuE/bd xFQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=z3m4KDW3Ix7OxE3MDJf1uyVqIqJEfLu4bcWkXuVOSH4=; b=AkISnvVmsfvz92Il5dssldex4yvl48C0BGI7TJdENO4bamLRZVTJnO7H2+RI6CS1MI BQ7WrkDZ1mrwVkDMJHGy+xouggJGwj22w9vEO5J5El/MtlF2x+9/9hFXnyhSR1fYv2ny rB0w9VWkCvvFgv8dPjgMkYe9WConwHuC+9Gs1Qo/8LidE2dDpaLODoXNUX2/cnApSxiQ +6WsYr+Co7OJePhN0z+wotSNk3kNJYF0830JkNakCyPLZICX2jnrv6htNeJSkI0Ng8ms N2CyO3e39UGPjRniHR+UhtojgAYGGZb6kayU4fg262ZjlmMAfmCWBDLZ41FUGMSShwEc c2Qw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f19si725226ejx.348.2020.09.11.00.15.38; Fri, 11 Sep 2020 00:16:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725536AbgIKHOg (ORCPT + 99 others); Fri, 11 Sep 2020 03:14:36 -0400 Received: from verein.lst.de ([213.95.11.211]:35803 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgIKHOe (ORCPT ); Fri, 11 Sep 2020 03:14:34 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 016DC68BFE; Fri, 11 Sep 2020 09:14:29 +0200 (CEST) Date: Fri, 11 Sep 2020 09:14:29 +0200 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , Tony Luck , Fenghua Yu , Thomas Bogendoerfer , iommu@lists.linux-foundation.org, Tomasz Figa , Joerg Roedel , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH 09/12] dma-direct: remove __dma_to_phys Message-ID: <20200911071429.GE22394@lst.de> References: <20200908164758.3177341-1-hch@lst.de> <20200908164758.3177341-10-hch@lst.de> <5d797c06-401d-62b1-f144-ea6e9a5144dd@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5d797c06-401d-62b1-f144-ea6e9a5144dd@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.