Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp568217pxf; Thu, 11 Mar 2021 09:35:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3gpbITapUNW1C1lAYCOT15d8wwt+YGNRWG8/WqrGfC8WAbaTogLpLzSTA/tOEeQnky1WU X-Received: by 2002:a05:6402:4309:: with SMTP id m9mr9974449edc.25.1615484157779; Thu, 11 Mar 2021 09:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615484157; cv=none; d=google.com; s=arc-20160816; b=ARzLfSjibrO25wTArUYjcttxBLKmrsndhefERKnqqgrP6StW6sdrpUKFen/4wYZTbO WziDvs+bk7zW8tXSCR71t8u23OkKs1GLgKvmFfQWNxGQvnMiWwE/M/zB7WAbFuvSpj+B T/SiFv8pri4z9F/qlJqBBj37VIROiIft6Nl0IKvOr4N3X9tMXf/7t0nti1Ye/CpZ4QWX kF6/BhqqoN4FwtvNNMkXN0Y0EEq151qtdAE5oXlHQfynbn8DXliZzZbbOvI6bx154XSq CkPylV158hz/WPoboh52Jk8kn7dFFsnxlmD060bW0VZUxwgPRSsiPIyYrdfzzYwimDn3 R1yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=X2hByGesMLC7S7FX4s74HPFQgAwGhFK7JM+LBcK6PDk=; b=kCEPDzCVz+hvR8nP6wVRvHWmvCF2pFtiADYhUgDRL6ENK6Oy1mLCUdYGUEOpyCUEQ1 bnU2KZmscYgurJJNTiuqlFtBU14n0jVRQM8bRLwiKaDZiX65l2m7G3F7MzFyPiGf06nh 9bwEH8DVF67k7fpxmJoMzt6fvqjyRZlbY+HS7ngvJEeF7XYEzqG5DVB4IS7MVMFJPZPR JeofhLMdxroVbKQmfYPVDoHKUiu6n9CYPhdEeR7nGJvZeq6u582gDbT+uuCvIua+0EHX 94E0N1awQOcLB9qfcKr9Ujz3zAg9TMCBj580X31mw18jTqwp9jEx9qhRsQ8oNpKBL9SZ KUgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=StXTdMIY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb41si2090068ejc.90.2021.03.11.09.35.33; Thu, 11 Mar 2021 09:35:57 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=StXTdMIY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229791AbhCKRdz (ORCPT + 99 others); Thu, 11 Mar 2021 12:33:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:44164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbhCKRdq (ORCPT ); Thu, 11 Mar 2021 12:33:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EA49D64F3B; Thu, 11 Mar 2021 17:33:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615484026; bh=o1Y/vDKuu7aZiyDLEgSjzY1Vv/0l7khcTBK8HwjsoGQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=StXTdMIYRq9vcgvR/dNjfS56cBddLlVJKJKQCvqtMCFBUNOmXutiPeoJ11Xx+VuFf /+KHCvw2+OwLpL5UG3eIpA7QD+TTLKRBf0ZNuXB0dXulvFP4o8j0qXCShLJTTRziEJ Jz93U5S57TqEzZGJGMG3o+bJfkctMgi7nsgqDrS6tbFL2JVzI0kj4XQPNvj03uWuX8 aQe+reCBQMj3x6wujDSOp9VOMDgySuxMMasbiUj2/yB8tsH1wzLGSBQSdbFO4ZR+Nl oLgn3H/8voL9Qn7/3w3ZDyYgX4JmD3GrntZ7HSnGS021nluLybNz8+xGkf6pjORDrJ FuNIT9hRcqnyA== Date: Thu, 11 Mar 2021 17:33:38 +0000 From: Will Deacon To: Quentin Perret Cc: catalin.marinas@arm.com, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, android-kvm@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, tabba@google.com, mark.rutland@arm.com, dbrazdil@google.com, mate.toth-pal@arm.com, seanjc@google.com, robh+dt@kernel.org, ardb@kernel.org Subject: Re: [PATCH v4 27/34] KVM: arm64: Always zero invalid PTEs Message-ID: <20210311173338.GB31378@willie-the-truck> References: <20210310175751.3320106-1-qperret@google.com> <20210310175751.3320106-28-qperret@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210310175751.3320106-28-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 10, 2021 at 05:57:44PM +0000, Quentin Perret wrote: > kvm_set_invalid_pte() currently only clears bit 0 from a PTE because > stage2_map_walk_table_post() needs to be able to follow the anchor. In > preparation for re-using bits 63-02 from invalid PTEs, make sure to zero Why do you exclude bit 1 from this range? > it entirely by ensuring to cache the anchor's child upfront. > > Suggested-by: Will Deacon > Signed-off-by: Quentin Perret > --- > arch/arm64/kvm/hyp/pgtable.c | 26 ++++++++++++++++---------- > 1 file changed, 16 insertions(+), 10 deletions(-) For the patch: Acked-by: Will Deacon Will