From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5A4FC43461 for ; Thu, 10 Sep 2020 12:43:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 43F73208FE for ; Thu, 10 Sep 2020 12:43:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CLXmEF4x"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="tl9mouv2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 43F73208FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4hEfCB7yx7z0n6dDPy8Y2r/Q3+kHtlhxQtV28T7gPhM=; b=CLXmEF4xdWjIqKiU4CUeoYCNM 0VYKwR8T4Stkgp8B/MTMuoEmG6COXT4dRypU1iuR0BGkGRFnDPb52qMXHMlCNgkUvtiGFyB3wDGEl iyl/T96N3VXJkC405wtNGk0CgJca6vmFnmYydBT7A112//PfcyzpkjjJs9n2mF7aWaqLRWVCYHcbf nO/0s+Re1Xa9SjH51Srw3TFnnSozN0WW2at6fTc7FbpHevoYL1wQYrBQadz6kDoE9YX7kb/HOCd/M QiT1iKxv7LDYwt8qNZeGG5vU7RvwVYlKCFMjGK/pq+W+sInTwR41i3Px5uMGLTtL85hS1BXOAyex8 jMCeM6aLQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGLu1-0006Jg-6c; Thu, 10 Sep 2020 12:42:13 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGLty-0006JG-EW for linux-arm-kernel@lists.infradead.org; Thu, 10 Sep 2020 12:42:11 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D005D208FE; Thu, 10 Sep 2020 12:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599741729; bh=s/ImfSj4GtOVqobSLRCwmo2Y6eUw8cRqEt3SO+ax0WM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tl9mouv28NgKI/NwlPeWBC4meBdVR8Fp4ha/h5PQN7m4PRxUqg+/MYeMM7XgELOt4 FYE7p7QFlx7KmFWYbaDtV84yUcKLkMcLJ+76n48PgYBLTO38TRWZkexS0P3e6DWgbZ n5glcN+0OSaCyCaw3Ay9Pr0isis7uSBoSNDkaZkE= Date: Thu, 10 Sep 2020 13:42:04 +0100 From: Will Deacon To: Alexandru Elisei Subject: Re: [PATCH v4 10/21] KVM: arm64: Add support for stage-2 page-aging in generic page-table Message-ID: <20200910124204.GC18100@willie-the-truck> References: <20200907152344.12978-1-will@kernel.org> <20200907152344.12978-11-will@kernel.org> <080cd3d9-4979-1d72-0c5a-188334b5a26a@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <080cd3d9-4979-1d72-0c5a-188334b5a26a@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200910_084211_123821_11E702A6 X-CRM114-Status: GOOD ( 15.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gavin Shan , Suzuki Poulose , Marc Zyngier , Quentin Perret , James Morse , Catalin Marinas , kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Sep 08, 2020 at 04:30:15PM +0100, Alexandru Elisei wrote: > On 9/7/20 4:23 PM, Will Deacon wrote: > > +kvm_pte_t kvm_pgtable_stage2_mkyoung(struct kvm_pgtable *pgt, u64 addr) > > +{ > > + kvm_pte_t pte = 0; > > + stage2_update_leaf_attrs(pgt, addr, 1, KVM_PTE_LEAF_ATTR_LO_S2_AF, 0, > > + &pte); > > + dsb(ishst); > > I am curious about the DSB above. We don't do it when we clear the AF bit, because > in the clear_flush_young() mmu notifier, kvm_age_hva() is followed by > kvm_flush_remote_tlbs() -> kvm_flush_remote_tlbs(), which does a DSB ISHST. > > When AF is zero, the entry is not allowed to be stored in a TLB, and that's why we > don't need to issue a TLBI instruction. Do we do the DSB here to make sure all PEs > in the inner shareability domain see the updated translation tables? Or there's > another reason I'm not seeing? You're right: the DSB is to ensure that the updated PTE is visible to the page-table walker, as I'm not sure how well we'll handle the spurious access fault in this case (particularly as is_young() would return true). Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel