From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EA68824E010; Thu, 13 Mar 2025 13:13:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741871608; cv=none; b=Uus+LFOIVFrtUOpTPVBh1SqqKI4VtgMQzmBB/HtKvhPQwQS6xCjVJyypC86ztnn7i0KHQr5Gq/RClTBOToUNbsG/2SMRj3mOlJmxXHkI2LKkb69S38E65+dueEJUP+5w1dmfM7a0Z0+fo0ne44EwmwxHVij2P77LOns2cVt4ssw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741871608; c=relaxed/simple; bh=J+z1n7Bxb6o8wTtsy7p3X4ZDKg+uInjMhyvc0Z6LT7s=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=dTRALuzsyxda9Z78h5m1xbDI8y+HctJConxISpYVBGkuz8tbA0RFb3fvZ1p3thkv2jd+AgEwibFt+6HwwFSmXOZ47IE2Ii6QqYjbTK4STzSmZ0oc2QrwB5adm/VuwnBB6nK8KfbG0J4DzdJIfBbGhYeK5r/b1xasU8+HHGB5DGo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iGDMr1yt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iGDMr1yt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D896C4CEDD; Thu, 13 Mar 2025 13:13:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741871607; bh=J+z1n7Bxb6o8wTtsy7p3X4ZDKg+uInjMhyvc0Z6LT7s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iGDMr1yt56hT38AnU7QgtDJVRAQ4z/El7xyRR254R19Mw9lHbuxc5KNyYJxOLR2N3 1ss3vY7timc0KPyaVXnWTlDkHQGwykniSSjeIpwa8N7TDwcC6TWuCfQr7/rt2xy6ni sEvEAsdaqQ45HXAtcNHgImRIzPfXBt03m2nVl4q9mV2drYlZUbmN+gingSHtEyCJnQ nDK9oJ5njude0QOmAW+Baj39uitmDi5sEQQEjRU2/sZaz9jREYRBhKl0CZ/wb1nXKa feM34oAR3rC1yE+h0La2SlFBRYrZwnLaPvgWK9kbnkwLiDu45v8fEd90ArwFXsWlQm B8LAozVr/324g== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tsiNJ-00DDNZ-3d; Thu, 13 Mar 2025 13:13:25 +0000 Date: Thu, 13 Mar 2025 13:13:24 +0000 Message-ID: <86jz8tnkej.wl-maz@kernel.org> From: Marc Zyngier To: Vincent Donnefort Cc: oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, qperret@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v4 0/3] Count pKVM stage-2 usage in secondary pagetable stat In-Reply-To: <20250313114038.1502357-1-vdonnefort@google.com> References: <20250313114038.1502357-1-vdonnefort@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: vdonnefort@google.com, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, qperret@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Thu, 13 Mar 2025 11:40:35 +0000, Vincent Donnefort wrote: > > This series allows to count stage-2 related memory when using pKVM. The > value can be found in the /proc/meminfo field SecPageTables. > > Changes since v3: https://lore.kernel.org/all/20250307113411.469018-1-vdonnefort@google.com/ > - Remove unnecessary void * cast (Marc) > - Rename reclaim_guest_pages() -> reclaim_pgtable_pages() (Marc) > - Remove unnecessary PAGE_ALIGN(pgd_sz) > > Changes since v2: https://lore.kernel.org/all/20250304134347.369854-1-vdonnefort@google.com/ > - Pass a pointer to kvm_hyp_memcache instead of just the flags > (Oliver) > > Changes since v1: https://lore.kernel.org/all/20250228121355.1377891-1-vdonnefort@google.com/ > - Flags to kvm_hyp_memcache > - Separate stage-2 memcache > - Account for PGD > > Vincent Donnefort (3): > KVM: arm64: Add flags to kvm_hyp_memcache > KVM: arm64: Distinct pKVM teardown memcache for stage-2 > KVM: arm64: Count pKVM stage-2 usage in secondary pagetable stats > > arch/arm64/include/asm/kvm_host.h | 4 ++++ > arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 2 +- > arch/arm64/kvm/hyp/nvhe/mem_protect.c | 2 +- > arch/arm64/kvm/hyp/nvhe/pkvm.c | 8 +++---- > arch/arm64/kvm/mmu.c | 22 ++++++++++++++----- > arch/arm64/kvm/pkvm.c | 5 +++++ > 6 files changed, 32 insertions(+), 11 deletions(-) Acked-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.