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 B1E14C4167B for ; Thu, 7 Dec 2023 15:12:59 +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=4IY0QGeJxhTJYHf9aTl9DMxdePk2tUr5quHYrciyvzE=; b=hbr+EDxZm7Uq6Q BP1+S1xtapN+9uruKtQcYn2DagL9kBb777mHRJuVJlIOiAHFfDXm2ty8+RgTLPlwIgIirvmdCx/hL jUhl4q4Bn5pGNzOjyTOLhSsgXfpENOaKiWCDWG1PBXBCvYeLuHnHBU94icBWegxhGgQX3NWjEyeoX 05YPN6F6vXY5MnKlT1fEjpCayj/n6FEPeol99clXlpS7ZIjNM4RQcIFnGzLPLj1BbgNFTVrmKqJzY gyOOnvqTt3nNCDwpKwHHFqxDofyoetZb3vBEraalDa5j9nBkPokwwxgiYtjcvGV5LI7QkHMTlz5NJ 3hpt1zhZqeDNoAifwINw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rBG3G-00D9RT-1i; Thu, 07 Dec 2023 15:12:34 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rBG32-00D9Gi-3D for linux-arm-kernel@lists.infradead.org; Thu, 07 Dec 2023 15:12:22 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 1F309CE2475; Thu, 7 Dec 2023 15:12:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E013EC433C7; Thu, 7 Dec 2023 15:12:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701961935; bh=SnsvmIC202ior+1r69+srxR7F82K1dQtOQXdiYjPx7k=; h=From:To:Cc:Subject:Date:From; b=jzFjWXVC8Redtt2hoE0mpBCM8NSbvS5MurAwlMk/G3mMI0LVAJcmL5Qbx7mwpXXTe qHFnT9MsfskpOruldhLPfCg41x8U98zJsfePjIo6uDlETkR24LjKIN5UJgYGXtC94S g9YWUC+YntKGmjyrH/55dKiy++ZhEP/5qiODux7fqeY6jVEa5uQMNWZK14Yoa4xreu hccSBRwUIeUBj25LwUtqIx4kvZo1ocajRdYjm3R4lAxa2Etn2dgq9NCJJedwCUM7QW KJaYThoLwGbBC4eKfT/137JWH1vCDbv8cma0yZjpA1ljBpHZyM4643O14r9G3sKAke RRRr0dnw9mxJg== 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 1rBG2v-002FcG-79; Thu, 07 Dec 2023 15:12:13 +0000 From: Marc Zyngier To: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Will Deacon , vdonnefort@google.com Subject: [PATCH 0/5] KVM: arm64: vgic fixes for 6.7 Date: Thu, 7 Dec 2023 15:11:56 +0000 Message-Id: <20231207151201.3028710-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, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com, will@kernel.org, vdonnefort@google.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-20231207_071221_265539_EE7F664B X-CRM114-Status: GOOD ( 11.67 ) 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 It appears that under some cirumstances, the lifetime of a vcpu doesn't correctly align with that of the structure describing the redistributor associated with that vcpu. That's not great. Fixing it is, unfortunately, not as trivial as it appears as the required locking gets in the way. The first two patches in this series amend that locking so that the third patch, which is the actual fix, becomes almost trivial. The last two patches are more cosmetic and only add assertions that helped me debugging the whole thing. I've earmarked the first 3 patches as stable candidates, and would love to see them in 6.7. Patches on top of -rc4. Marc Zyngier (5): KVM: arm64: vgic: Simplify kvm_vgic_destroy() KVM: arm64: vgic: Add a non-locking primitive for kvm_vgic_vcpu_destroy() KVM: arm64: vgic: Force vcpu vgic teardown on vcpu destroy KVM: arm64: vgic: Ensure that slots_lock is held in vgic_register_all_redist_iodevs() KVM: Convert comment into an assertion in kvm_io_bus_register_dev() arch/arm64/kvm/arm.c | 2 +- arch/arm64/kvm/vgic/vgic-init.c | 47 ++++++++++++++++++------------ arch/arm64/kvm/vgic/vgic-mmio-v3.c | 4 ++- arch/arm64/kvm/vgic/vgic.h | 1 + virt/kvm/kvm_main.c | 3 +- 5 files changed, 36 insertions(+), 21 deletions(-) -- 2.39.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel