Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3914066rwd; Mon, 22 May 2023 23:46:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ldKXTGgn/7a6B0YMN4xTYRbHyml8wcOxLAD2CofiqBBAaftDja+iQoNS2j3BELp6yed9x X-Received: by 2002:a05:6a20:54a1:b0:100:24d7:545a with SMTP id i33-20020a056a2054a100b0010024d7545amr15069359pzk.4.1684824397998; Mon, 22 May 2023 23:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684824397; cv=none; d=google.com; s=arc-20160816; b=gMj7rfCgRAdYyWzCFYPc3Pips4JEwN+u5Q422EPyKn0PVMZ741OZ6PvwAJDJPNpCta 13/1vELlGOlnXlGsP7jpwyAHbJ8uuUlfTWUOTFci5a9koB0VqgBlq9ZnShcqCTD/mnKU vxdFxmx+qLYS2t7uTB1u0V2XZepne/MhD3c+PwF1XZtRY7Sh5TVbKTBO6e0+KEU5AOCo 78UeIcvNMcJZgRlgSdVcxWmLtQwTUu/q+sKvqR7HoMONZXFlN3MPLUt48VKK7gQqkin5 iLO82U8GSR3XVL8q9aHmbed9y70aSkV+t4JABN0oG7g2eoZ22HGDfEFNAkcFIZLWB9vW VYBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0gea6RehJXx9DE2mUeb9T6tvlF6DNioynOY2MO8ezuc=; b=XLLPObHx1CPZ4SmLNnW4Qo8SNSFGELgUHPgChiB1GedWiKgd2Pe/hLs5QW1/GMzsH3 1IuKawBd+87R8BA214yMgm5kwE606SOCjSAL0bnrXDofiSlAJf+TvZgP6udOgldW0TID m4yqyFvNHrnyyjdv2hYWqkzHKTiqpgfKNtDR7ZmXnXeomiI51/Hxc3mFk9qj/Ahl5qe3 l7UBlTUf5uEfqaIjIQiEec9Y9TVjPf43rnMX6UEMZHahMUAMyD7lyY0Rb+LVunbyEX/Y x+41Eku8qJ5bAFf/dtJgaeDL2cB3ewue8fjE2ZMrgGfZ/g8vnUwUerM/ifzfT6Zm5zKK wLPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Ox6CC6l+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s199-20020a632cd0000000b005347c4d09dcsi990835pgs.675.2023.05.22.23.46.25; Mon, 22 May 2023 23:46:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Ox6CC6l+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234819AbjEWGpX (ORCPT + 99 others); Tue, 23 May 2023 02:45:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231784AbjEWGpV (ORCPT ); Tue, 23 May 2023 02:45:21 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C43511F; Mon, 22 May 2023 23:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0gea6RehJXx9DE2mUeb9T6tvlF6DNioynOY2MO8ezuc=; b=Ox6CC6l+zWAZhhJfa1q2YddRlq 2ayM85IfKhwJ7m7JOwrnDLaSuCDKOUjUTefjigDVLII9Gxxj+V8ccY38we9x92Pr5r8dO6iOL+4Ih 1fdJZzuoNBNQlL7XWpuLlVk1bH0uWrjppmcokLoVbI/+UzoRe5VHZK8pW02pU3wcDIEiXRdwBMV1Y Lr8xIHXBdJukeHW7sAll5I0I/wv4bW/xiDLY1YqFSDkNzlIoGAikETRPs/gJ6TPccCHabdLt1aCji OOMfKZo6fH6J4HqKV7RZ8LMFKYc0AB7GvZgwDw0MsXGxXo7PMrHR4jfSzflJcCeM0nRL+nJhm9U8U HAiIL7WA==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q1Llg-0096va-27; Tue, 23 May 2023 06:45:12 +0000 Date: Mon, 22 May 2023 23:45:12 -0700 From: Christoph Hellwig To: Alistair Popple Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, robin.murphy@arm.com, will@kernel.org, nicolinc@nvidia.com, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, jgg@nvidia.com, John Hubbard Subject: Re: [PATCH] mmu_notifiers: Notify on pte permission upgrades Message-ID: References: <20230522063725.284686-1-apopple@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230522063725.284686-1-apopple@nvidia.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 22, 2023 at 04:37:25PM +1000, Alistair Popple wrote: > This problem was discovered during testing of an ARM SMMU > implementation that does not support broadcast TLB maintenance > (BTM). In this case the SMMU driver uses notifiers to issue TLB > invalidates. For read-only to read-write pte upgrades the SMMU > continually returned a read-only PTE to the device, even though the > CPU had a read-write PTE installed. > > Sending a mmu notifier event to the SMMU driver fixes the problem by > flushing secondary TLB entries. A new notifier event type is added so > drivers may filter out these invalidations if not required. Note a > driver should never upgrade or install a PTE in response to this mmu > notifier event as it is not synchronised against other PTE operations. I don't see these SMMU driver changes anywhere. I.e. you're adding dead code as far as I can tell.