From patchwork Fri Mar 22 17:09:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 13600335 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 CF9CEC47DD9 for ; Fri, 22 Mar 2024 17:10:53 +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=xqRnoYr5ba4r9LkUFvEuxgkm6iCj7reeNIobeKvgsug=; b=EVS8xKd8G25BjX ibce4Pgbeap7jeB8DH/EnjESl3nTP5FHaTn7Wg3DjV0z7lYdTgLrfuLR4TaCWGo67VZ1Gn9NPWY8T lLSbvcbGIWqUj4fwBZsCFwMxLgu1QZ9bk1bxXJXEvhulI3vRbaSyDyb9Qe8/2QR0jtYFkXIq8hM9H wwgfcHMV6upR71dgrdKbOQxmuijrvPFcn5K4LKHKQhwH66ROpFHX8wdX4Q1YbE+NOi67Eqo4umyTH n2IU2nQz17FFUi4f53Lj3Q2cB4F8fh0f9Ry4RfRMgl6uG/FalbKFHd7lw5q5Hb9Vqqk4150sDgUdY xhAHwwP080TUn5f+B/pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rniPi-000000086yK-4Bps; Fri, 22 Mar 2024 17:10:43 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rniPD-000000086dV-3otZ for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2024 17:10:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id D7BF8CE0C47; Fri, 22 Mar 2024 17:10:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 121F1C433F1; Fri, 22 Mar 2024 17:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711127409; bh=zqbto1UmFuSmHwc92ciLO6aw2BxpiQNSK64sqGYAFsU=; h=From:To:Cc:Subject:Date:From; b=kHDUMfvcf2QXTd2JL0Ih7PkXIvfxZ3hiDBnl49PfrEGMUp33iSR8dKCETzBlQJ7zK 9kCZbAeAtZXG7nxEWM9cW0Of1SrHWDFffNxxJC76vzj5dpV4tdgYV0BqOC+vm1lg8j aGm26QFchubtmpB27F+dQxTKsynuUIZ6hr5gzTVCPEzYnapC7iEicXvSut1pY+vtlg CGTWhuJGewLDaeJmkbZM1YsG9jz5JcUXBahm0ghCNe6EWyFPeIbv4hyxB+vH9IW+gB IwKOVGKRMhpOBdjTi/7fw5o0rYLGuogo9DD+sXG6G7I2/e6krIavMaVM8VGAY2O3nR QVFCEQM636diw== 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 1rniP6-00EZPz-UI; Fri, 22 Mar 2024 17:10:06 +0000 From: Marc Zyngier To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Cc: James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , James Clark , Anshuman Khandual , Mark Brown , Dongli Zhang Subject: [PATCH v2 0/5] KVM: arm64: Move host-specific data out of kvm_vcpu_arch Date: Fri, 22 Mar 2024 17:09:40 +0000 Message-Id: <20240322170945.3292593-1-maz@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, james.clark@arm.com, anshuman.khandual@arm.com, broonie@kernel.org, dongli.zhang@oracle.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-20240322_101012_246949_50941824 X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is the second take on this series aiming at reducing the abuse of the kvm_vcpu_arch structure, and moving things info the per-CPU context. * From v1 [1]: - Fixed the per-CPU accessor outside of the hypervisor code (the protected case is... interesting) - Spelling fixes - Collected RBs - Rebased on kvmarm-6.9 [1] https://lore.kernel.org/r/20240302111935.129994-1-maz@kernel.org Marc Zyngier (5): KVM: arm64: Add accessor for per-CPU state KVM: arm64: Exclude host_debug_data from vcpu_arch KVM: arm64: Exclude mdcr_el2_host from kvm_vcpu_arch KVM: arm64: Exclude host_fpsimd_state pointer from kvm_vcpu_arch KVM: arm64: Exclude FP ownership from kvm_vcpu_arch arch/arm64/include/asm/kvm_emulate.h | 4 +- arch/arm64/include/asm/kvm_host.h | 89 ++++++++++++++++------- arch/arm64/kvm/arm.c | 8 +- arch/arm64/kvm/fpsimd.c | 13 ++-- arch/arm64/kvm/hyp/include/hyp/debug-sr.h | 8 +- arch/arm64/kvm/hyp/include/hyp/switch.h | 20 ++--- arch/arm64/kvm/hyp/nvhe/debug-sr.c | 8 +- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 3 - arch/arm64/kvm/hyp/nvhe/psci-relay.c | 2 +- arch/arm64/kvm/hyp/nvhe/setup.c | 3 +- arch/arm64/kvm/hyp/nvhe/switch.c | 6 +- arch/arm64/kvm/hyp/vhe/switch.c | 6 +- arch/arm64/kvm/hyp/vhe/sysreg-sr.c | 4 +- arch/arm64/kvm/pmu.c | 2 +- 14 files changed, 102 insertions(+), 74 deletions(-)