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 8D971433B6; Tue, 21 Nov 2023 19:02:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MnCEW1N0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08C6CC433C7; Tue, 21 Nov 2023 19:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700593369; bh=gMXUYkt8knGRYiC1FvMF8r845HfVg7cwv39TXqrEy5I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MnCEW1N0LxDfOPc09T2ReT0kfnJ2b9YtIoC10Ee7i8zy+5bV/OvRCMkczMJkdRwhQ ZVH+iU0Ylz5TJgbLT15b+Yk762OByJD2kPfxNFykkc7tLDdtq6iUll9wiJzXU9kubY W9ViqImF93XBS3v3pcfplew6gsKg3ieF8rLH2C4Nas0NgDvFOYErD6DUB50TKdrv+6 VZRH2VVM3bW3Mi1aG3ac/Ecearg+mFd6BhqXfpSyFqPxFenPMwuJSOrovkgEbFGow7 g5wejdrrHQZlvrVXA/vNQkZBg5sL1UNzWTDoLXUYZeoey3UzlOUgqCtEjRqawduRxg gCPX+MfsKrDSA== 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 1r5W1G-00FCTS-8w; Tue, 21 Nov 2023 19:02:46 +0000 Date: Tue, 21 Nov 2023 19:02:45 +0000 Message-ID: <86msv7ylnu.wl-maz@kernel.org> From: Marc Zyngier To: Miguel Luis Cc: "kvmarm@lists.linux.dev" , "kvm@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Alexandru Elisei , Andre Przywara , Chase Conklin , Christoffer Dall , Ganapatrao Kulkarni , Darren Hart , Jintack Lim , Russell King , James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu Subject: Re: [PATCH v11 00/43] KVM: arm64: Nested Virtualization support (FEAT_NV2 only) In-Reply-To: References: <20231120131027.854038-1-maz@kernel.org> 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: kvm@vger.kernel.org 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: miguel.luis@oracle.com, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alexandru.elisei@arm.com, andre.przywara@arm.com, chase.conklin@arm.com, christoffer.dall@arm.com, gankulkarni@os.amperecomputing.com, darren@os.amperecomputing.com, jintack@cs.columbia.edu, rmk+kernel@armlinux.org.uk, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 21 Nov 2023 16:49:52 +0000, Miguel Luis wrote: > > Hi Marc, > > > On 20 Nov 2023, at 12:09, Marc Zyngier wrote: > > > > This is the 5th drop of NV support on arm64 for this year, and most > > probably the last one for this side of Christmas. > > > > For the previous episodes, see [1]. > > > > What's changed: > > > > - Drop support for the original FEAT_NV. No existing hardware supports > > it without FEAT_NV2, and the architecture is deprecating the former > > entirely. This results in fewer patches, and a slightly simpler > > model overall. > > > > - Reorganise the series to make it a bit more logical now that FEAT_NV > > is gone. > > > > - Apply the NV idreg restrictions on VM first run rather than on each > > access. > > > > - Make the nested vgic shadow CPU interface a per-CPU structure rather > > than per-vcpu. > > > > - Fix the EL0 timer fastpath > > > > - Work around the architecture deficiencies when trapping WFI from a > > L2 guest. > > > > - Fix sampling of nested vgic state (MISR, ELRSR, EISR) > > > > - Drop the patches that have already been merged (NV trap forwarding, > > per-MMU VTCR) > > > > - Rebased on top of 6.7-rc2 + the FEAT_E2H0 support [2]. > > > > The branch containing these patches (and more) is at [3]. As for the > > previous rounds, my intention is to take a prefix of this series into > > 6.8, provided that it gets enough reviewing. > > > > [1] https://lore.kernel.org/r/20230515173103.1017669-1-maz@kernel.org > > [2] https://lore.kernel.org/r/20231120123721.851738-1-maz@kernel.org > > [3] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/nv-6.8-nv2-only > > > > While I was testing this with kvmtool for 5.16 I noted the following on dmesg: > > [ 803.014258] kvm [19040]: Unsupported guest sys_reg access at: 8129fa50 [600003c9] > { Op0( 3), Op1( 5), CRn( 1), CRm( 0), Op2( 2), func_read }, > > This is CPACR_EL12. CPACR_EL12 is redirected to VNCR[0x100]. It really shouldn't trap... > Still need yet to debug. Can you disassemble the guest around the offending PC? > As for QEMU, it is having issues enabling _EL2 feature although EL2 > is supported by checking KVM_CAP_ARM_EL2; need yet to debug this. The capability number changes at each release. Make sure you resync your includes. M. -- Without deviation from the norm, progress is not possible.