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 58B51172773; Sun, 8 Sep 2024 15:27:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725809233; cv=none; b=PHz0B0SspjCOwLPcxBwthvVPuIqqFbCvElwji3rcdKdSjh9YK4Ye7+TGm/rI5Wv+KyvUC8GMBIZ1/vTLtuEiObbE//Hq8k7ke8K1QWlxJant3pgdZVLQoE4pNtSJ1ObW8SPQsqzUtk4b2pcFkj6ZpA8NBKOKBYVCnR9UD3jOuk0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725809233; c=relaxed/simple; bh=4moyDWWrRj2MAptHVCn4b48wcbz3IcwZ2VY0WVKUV1Q=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=VZDte1gcQfGC3OA9yo+Oe8PIvCNBMMJVjGqXsjq9TJIIrxeqDvrVDCbAxgs7+UHn4uBV6xw0Oh1YfTpzI/jqcx0mif/fa90w56sK5+NdYbN5FMPBRJfJkUokZTn7zpsTs5xwq3vF1goupiFpS3+hnYDuRSUglvh3ZgvrJnMQh+E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iyoS4/yU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iyoS4/yU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5D42C4CEC3; Sun, 8 Sep 2024 15:27:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725809232; bh=4moyDWWrRj2MAptHVCn4b48wcbz3IcwZ2VY0WVKUV1Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iyoS4/yUnJnS1G15/qLt2QjzGCBwMELRKMY5GnGu2QescsS+3riXEZFwkqx7O0yNn /5kLdJJlVD8TXuJ87Pw2YontsjYPhZDHG4poccHhuIQZ5PClIiIo05pOnzPyftexDn 50iGa1kFLsisI/secbKlWMXQK3RZiLLCeb0r6iR6p8jBaUFlVkCDM7AT/LeL/kNZao kE2SoUrQnHv45Sd4RYKK3/HX/v5KbKF7U4AxUsvSgCyJ3uBSkWEMfbq2AOHwAkGcUx snPeNuEvvb4GxMWLAFjGLWyqs8kFT8cpWDC6qoIdb29AB45HCNYr/ixKJXrGA3xob5 r8Lkdk2LStYKw== 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 1snJok-00Ah95-J3; Sun, 08 Sep 2024 16:27:10 +0100 Date: Sun, 08 Sep 2024 16:27:10 +0100 Message-ID: <86bk0yupwx.wl-maz@kernel.org> From: Marc Zyngier To: stable@vger.kernel.org Cc: stable-commits@vger.kernel.org, Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: Re: Patch "irqchip/gic-v4: Make sure a VPE is locked when VMAPP is issued" has been added to the 6.6-stable tree In-Reply-To: <20240908133637.1651482-1-sashal@kernel.org> References: <20240908133637.1651482-1-sashal@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.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: stable@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: stable@vger.kernel.org, stable-commits@vger.kernel.org, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Sun, 08 Sep 2024 14:36:37 +0100, Sasha Levin wrote: > > This is a note to let you know that I've just added the patch titled > > irqchip/gic-v4: Make sure a VPE is locked when VMAPP is issued > > to the 6.6-stable tree which can be found at: > http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary > > The filename of the patch is: > irqchip-gic-v4-make-sure-a-vpe-is-locked-when-vmapp-.patch > and it can be found in the queue-6.6 subdirectory. > > If you, or anyone else, feels it should not be added to the stable tree, > please let know about it. > > > > commit 1a232324773145ff7ce59b6a1b52b3247223f9d4 > Author: Marc Zyngier > Date: Fri Jul 5 10:31:55 2024 +0100 > > irqchip/gic-v4: Make sure a VPE is locked when VMAPP is issued > > [ Upstream commit a84a07fa3100d7ad46a3d6882af25a3df9c9e7e3 ] > > In order to make sure that vpe->col_idx is correctly sampled when a VMAPP > command is issued, the vpe_lock must be held for the VPE. This is now > possible since the introduction of the per-VM vmapp_lock, which can be > taken before vpe_lock in the correct locking order. > > Signed-off-by: Marc Zyngier > Signed-off-by: Thomas Gleixner > Tested-by: Nianyao Tang > Link: https://lore.kernel.org/r/20240705093155.871070-4-maz@kernel.org > Signed-off-by: Sasha Levin > > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c > index e25dea0e50c7..1e0f0e1bf481 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -1804,7 +1804,9 @@ static void its_map_vm(struct its_node *its, struct its_vm *vm) > for (i = 0; i < vm->nr_vpes; i++) { > struct its_vpe *vpe = vm->vpes[i]; > > - its_send_vmapp(its, vpe, true); > + scoped_guard(raw_spinlock, &vpe->vpe_lock) > + its_send_vmapp(its, vpe, true); > + > its_send_vinvall(its, vpe); > } > } > @@ -1825,8 +1827,10 @@ static void its_unmap_vm(struct its_node *its, struct its_vm *vm) > if (!--vm->vlpi_count[its->list_nr]) { > int i; > > - for (i = 0; i < vm->nr_vpes; i++) > + for (i = 0; i < vm->nr_vpes; i++) { > + guard(raw_spinlock)(&vm->vpes[i]->vpe_lock); > its_send_vmapp(its, vm->vpes[i], false); > + } > } > > raw_spin_unlock_irqrestore(&vmovp_lock, flags); > No please. Not only you are missing the essential part of the series (the patch introducing the per-VM lock that this change relies on), you are also missing the fixes that followed. So please drop this patch from the 6.6 and 6.1 queues. M. -- Without deviation from the norm, progress is not possible.