From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D642E80B for ; Fri, 28 Oct 2022 00:31:38 +0000 (UTC) Date: Fri, 28 Oct 2022 00:31:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1666917096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PWuFABbLpqs2NAt/gdQJrSTxN1tTAAGw3VvyTSX82Q4=; b=o1RskzbvFutkErsWCwGYjImhMuupkGgeqEHUyt5yh/abpipttj2iGC4UPtNb6aYekYZsFX LE+LDPYsaJusmbUecSTAF7v31hu2EDHfvQ6BhIYspMxKtnFfOKl0mvGGFdCOfDzFJ9ANun 8nCuFiBekyvEutRBRo/y+7AsiT6KJWY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Will Deacon Cc: kvmarm@lists.linux.dev, Sean Christopherson , Vincent Donnefort , Alexandru Elisei , Catalin Marinas , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , James Morse , Chao Peng , Quentin Perret , Suzuki K Poulose , Mark Rutland , Fuad Tabba , Marc Zyngier , kernel-team@android.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v5 04/25] KVM: arm64: Fix-up hyp stage-1 refcounts for all pages mapped at EL2 Message-ID: References: <20221020133827.5541-1-will@kernel.org> <20221020133827.5541-5-will@kernel.org> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221020133827.5541-5-will@kernel.org> X-Migadu-Flow: FLOW_OUT On Thu, Oct 20, 2022 at 02:38:06PM +0100, Will Deacon wrote: > From: Quentin Perret > > In order to allow unmapping arbitrary memory pages from the hypervisor > stage-1 page-table, fix-up the initial refcount for pages that have been > mapped before the 'vmemmap' array was up and running so that it > accurately accounts for all existing hypervisor mappings. > > This is achieved by traversing the entire hypervisor stage-1 page-table > during initialisation of EL2 and updating the corresponding > 'struct hyp_page' for each valid mapping. > > Tested-by: Vincent Donnefort > Signed-off-by: Quentin Perret > Signed-off-by: Will Deacon Reviewed-by: Oliver Upton -- Thanks, Oliver