From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96BC9C61DA4 for ; Thu, 9 Feb 2023 18:00:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5Na4gx1Kc6B9RcmpfwOJGrMyPrNWXNXkUUUy8qs4fqQ=; b=yJSu1lBX7dg0YP AldmXgkcBrfvwnU4cl1Lx1SU3OHvzhqp5KD2+IQvP4OR5E9vve40LTquj0zhAZorWGolHGT6gmpJ8 gUURrRt1izDVt8PlvpwN7rBmKQ9as+mKukCrRc2TcmVIDaAX6hhCYibVvUywIzGP56kfT7ehcpSUk nUqY0MOnQgRkrSXtH+Ko/ZlNvEtlU74ozFaNlCkuSBaUA7WiW1eA3uajB53+ae7lyDohiKnrMsdXL ijrNsDior4VkyzpJ4RF3TYrX3aLdy2bCzupNnsYu46NMQn80rKXYINEL3vsSEaIj8DAnHMBEVftfb s/ZDnlIzm9LxR4LSnEbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQBCn-002eqn-CH; Thu, 09 Feb 2023 17:59:33 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQBC7-002eZg-By for linux-arm-kernel@lists.infradead.org; Thu, 09 Feb 2023 17:58:53 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 25476B821CF; Thu, 9 Feb 2023 17:58:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C18A4C433D2; Thu, 9 Feb 2023 17:58:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675965527; bh=2KRNVETxyXEtrTIEUnDJDzge0zGfEtAgWGQPFgH8d5c=; h=From:To:Cc:Subject:Date:From; b=YT8SV1Sz1qP3PQRCd1ojFsQmmzfTNOr2oFDImiffjh0C/tiK0hqmBj/PLRQ783xLH 4uKPeoRIFmYrMqc7pCyQV19ENvWYqrqtm9XcfYfnw4jLm7R4yzMlgt6asA5HBYLdIM rdIuPxfy9yDM5TTpzs00WynOESv98pIsWcjVgvPQPL+BwXjePSpueZW/uyPuV1Hfno CWCJlg3N345APhVAuRXe//FEWVCrg/yTzXacy1tZKO09P0a+75gLJ+mECr1DQaCoVC 92TjQSoC8XXf+k6EOcVA5T0zml8UDBqxNEmZqxHTtYQS6yt/GLXnrpVBoDJTbzdb9D gEPBhmd1xKKlA== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pQBC1-0093r7-FG; Thu, 09 Feb 2023 17:58:45 +0000 From: Marc Zyngier To: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Alexandru Elisei , Andre Przywara , Catalin Marinas , Christoffer Dall , Ganapatrao Kulkarni , Russell King , James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu Subject: [PATCH 00/18] KVM: arm64: Prefix patches for NV support Date: Thu, 9 Feb 2023 17:58:02 +0000 Message-Id: <20230209175820.1939006-1-maz@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, alexandru.elisei@arm.com, andre.przywara@arm.com, catalin.marinas@arm.com, christoffer.dall@arm.com, gankulkarni@os.amperecomputing.com, 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_095851_747849_EE2C59C4 X-CRM114-Status: GOOD ( 17.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org As a bunch of the NV patches have had a decent amount of review, and given that they do very little on their own, I've put together a prefix series that gets the most mundane stuff out of the way. Of course, nothing is functional, but nothing gets used either. In a way, this is pretty similar to the current state of pKVM! ;-) Thanks, M. Christoffer Dall (6): KVM: arm64: nv: Introduce nested virtualization VCPU feature KVM: arm64: nv: Reset VCPU to EL2 registers if VCPU nested virt is set KVM: arm64: nv: Allow userspace to set PSR_MODE_EL2x KVM: arm64: nv: Add nested virt VCPU primitives for vEL2 VCPU state KVM: arm64: nv: Handle trapped ERET from virtual EL2 KVM: arm64: nv: Only toggle cache for virtual EL2 when SCTLR_EL2 changes Jintack Lim (7): arm64: Add ARM64_HAS_NESTED_VIRT cpufeature KVM: arm64: nv: Handle HCR_EL2.NV system register traps KVM: arm64: nv: Support virtual EL2 exceptions KVM: arm64: nv: Inject HVC exceptions to the virtual EL2 KVM: arm64: nv: Handle PSCI call via smc from the guest KVM: arm64: nv: Add accessors for SPSR_EL1, ELR_EL1 and VBAR_EL1 from virtual EL2 KVM: arm64: nv: Emulate EL12 register accesses from the virtual EL2 Marc Zyngier (5): KVM: arm64: Use the S2 MMU context to iterate over S2 table KVM: arm64: nv: Add EL2 system registers to vcpu context KVM: arm64: nv: Emulate PSTATE.M for a guest hypervisor KVM: arm64: nv: Allow a sysreg to be hidden from userspace only KVM: arm64: nv: Filter out unsupported features from ID regs .../admin-guide/kernel-parameters.txt | 7 +- arch/arm64/include/asm/esr.h | 4 + arch/arm64/include/asm/kvm_arm.h | 19 +- arch/arm64/include/asm/kvm_emulate.h | 66 ++++++ arch/arm64/include/asm/kvm_host.h | 42 +++- arch/arm64/include/asm/kvm_mmu.h | 11 +- arch/arm64/include/asm/kvm_nested.h | 20 ++ arch/arm64/include/asm/sysreg.h | 38 +++- arch/arm64/include/uapi/asm/kvm.h | 1 + arch/arm64/kernel/cpufeature.c | 25 +++ arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/arm.c | 5 + arch/arm64/kvm/emulate-nested.c | 203 ++++++++++++++++++ arch/arm64/kvm/guest.c | 6 + arch/arm64/kvm/handle_exit.c | 45 +++- arch/arm64/kvm/hyp/exception.c | 48 +++-- arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 19 +- arch/arm64/kvm/hyp/vhe/switch.c | 24 +++ arch/arm64/kvm/inject_fault.c | 61 +++++- arch/arm64/kvm/mmu.c | 16 +- arch/arm64/kvm/nested.c | 162 ++++++++++++++ arch/arm64/kvm/reset.c | 16 ++ arch/arm64/kvm/sys_regs.c | 174 ++++++++++++++- arch/arm64/kvm/sys_regs.h | 14 +- arch/arm64/kvm/trace_arm.h | 59 +++++ arch/arm64/tools/cpucaps | 1 + 26 files changed, 1041 insertions(+), 47 deletions(-) create mode 100644 arch/arm64/include/asm/kvm_nested.h create mode 100644 arch/arm64/kvm/emulate-nested.c create mode 100644 arch/arm64/kvm/nested.c -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel