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 A3F80182A9 for ; Fri, 20 Oct 2023 10:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mC9rrmVF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECF8EC433C7; Fri, 20 Oct 2023 10:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697799268; bh=U8cogbKLl6wAfeAjw08abJ2sY2689AhpvwmsjGNgcQg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mC9rrmVFmD/ERcSkFogWjlQlnsu5ZHbF+epZoEPqs79Shoa4fLgm1hgOgPgQ7dL4U 1uyL7RL2icJpsqMTLbT/dIfduuTf0uRIF6X904tfI5I/M86JyaYDzrbH84GAeipYz3 U/a2f0Dp17karlc19ETj+7BzB3+FKCa6PwD8ih2Ha3JC3wOt+bOQMxOt73WKBEtK1J otp3gD9K0933lxlS7nexBZzVvdO2e1JeC2JBu3P/5Qs6zo7y3GXG+Lo5+Z5KYCqRz2 6WhX7IiC7EFZ0PBdlOSwphvIVnEUt61kXp3C1G3jLquL0E3ypw4wrc6IIWtpbi/4CM I8K1cbzFpHVzg== 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 1qtn97-0065dz-Lc; Fri, 20 Oct 2023 11:54:25 +0100 Date: Fri, 20 Oct 2023 11:54:25 +0100 Message-ID: <867cnhmun2.wl-maz@kernel.org> From: Marc Zyngier To: Ryan Roberts Cc: Catalin Marinas , Will Deacon , Oliver Upton , Suzuki K Poulose , James Morse , Zenghui Yu , Ard Biesheuvel , Anshuman Khandual , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: Re: [PATCH v4 00/12] KVM: arm64: Support FEAT_LPA2 at hyp s1 and vm s2 In-Reply-To: <20231009185008.3803879-1-ryan.roberts@arm.com> References: <20231009185008.3803879-1-ryan.roberts@arm.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.1 (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: ryan.roberts@arm.com, catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, suzuki.poulose@arm.com, james.morse@arm.com, yuzenghui@huawei.com, ardb@kernel.org, anshuman.khandual@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Hi Ryan, On Mon, 09 Oct 2023 19:49:56 +0100, Ryan Roberts wrote: > > Hi All, > > This adds support for FEAT_LPA2 to KVM for both hypervisor stage 1 (for the > nvhe/protected modes) and the vm stage 2 translation tables (for all modes). > FEAT_LPA2 enables 52 bit PAs and VAs for 4KB and 16KB granules (note this is > already supported for 64KB granules via the FEAT_LPA and FEAT_LVA extensions). > The series does not include support for FEAT_LPA2 in the kernel stage 1. This > support is provided separately by Ard Biesheuvel's series at [4]. The two series > are mostly independent. > > This is a small update from v3, rebased onto v6.6-rc5 and incorporating some > minor changes based on review comments from Oliver. > > NOTE: I've included my patch to update the range-based tlbi functions to work > with LPA2 in this version, because KVM has started using range-based tlbi > invalidation as of v6.6-rc1. I've done this in such a way that KVM-originated > calls will use the LPA2 format if LPA2 is in use by KVM, but the > kernel-originated calls are hardcoded to never use the LPA2 format. If merging > with Ard's series, you will need to update the 2 calls to __flush_tlb_range_op() > from __flush_tlb_range() appropriately. > > > Testing > ======= > > Testing has been done exclusively on the FVP and covers my boot matrix tests > and kvm selftests. > > The host/guest config boot matrix gives the same (expected) results as for the > v3 submission; of 180 conifgs, 12 fail, and these are all due to attempting to > load the host kernel into high memory which isn't expected to work until the > kernel has FEAT_LPA2 support for its stage 1. (refer to v1 posting for details > on the exact configs). > > KVM selftests have been enhanced to support P52V48 4K and 16K guest modes, and > all tests have been run against a P48V48_4K host and a P52V52_4K host (a run > takes about 10 hours on FVP, sigh, but I can test a few more host configs if > useful). Have you tried with the (brand new) "arm64_sw.hvhe=1" command-line option, which enables VHE for the EL2 hypervisor only? I expect things to work, but it would be good to make sure... > All tests pass except "memslot_perf_test", which fails due to a timeout > while syncing. This test fails in the same way for plain v6.6-rc1, so I'm > confident this is not a regression caused by this series. (the issue is that > alarm(2) is issued and the signal is received before alarm(0) is issued. I > expect this is an FVP-time related problem, although I'm not sure how to fix > robustly for the FVP without potentially hanging real systems for long periods > of time). [...] This is starting to look good, and I only had pretty minor comments on this series so far. It is too late for 6.7, but if you can respin it for -rc1, I'll happily review it again and queue it for 6.8 if things keep looking OK. Thanks, M. -- Without deviation from the norm, progress is not possible.