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 BE55CC3DA61 for ; Mon, 29 Jul 2024 09:49:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=scy5GNLyCVPvAA5J9VSYbLUa7zArNl9+ZZGGqimm8II=; b=kjQgVXVelWN6K4sL6M3EjNUN4G 4alpuqmWerL4hZiLgOXagFsC9+V4SYWPKVS31c5vTsozeOSIvCodnhTn0XGjJYmWJA7y3dA/ArOSy ivd7fabD8PE1rb1wpiowmTD3TyyGUFRiN2ltusW8FXPZ1ar5+kMmdz0f6aSAUBJoBRKNCdVPxxbl/ oMVesWj/CwMZk1WG1JqIr00fJHe+Xhw2uSS8co/ykpSA0/n3QSamHNM4uKwbWq3arUsAeHKwYwN9s e0GZ+QY+vNcXoLQo1rG8Cl0p9IZC8ZJvJdisEXK23BIY9Ufx4Cs5n2Q0BipMU5w8aHura8gIGtZh0 zFtCLd3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYMzs-0000000Al74-1aAl; Mon, 29 Jul 2024 09:48:52 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sYMzO-0000000Akyr-15q2 for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2024 09:48:25 +0000 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1722246501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=scy5GNLyCVPvAA5J9VSYbLUa7zArNl9+ZZGGqimm8II=; b=EEFvBQygRPCgLIRplU+wxNf8jwrrzLG6bvHRLhOecqOg61a8Q1nHhmc8MD/Di6Cf3UmuZG 8R9v1gHOXtQLvjjLLCWwvKbSbOtGGi1BZVbGxzpsFmgdSqaIvikNB7FceW2M+RkVOIct+3 wBPH3n44u7q165icqKSufZsbTDX0cV8p8yvmFHC7btg2/Tse2zrRxdR+WM5d8F5l2WStgy XnFq4vbwA0Q1KF/mZRbHTL92CZm7wJel6xnmjBj23T1XbhoWTL7SFcK6cyOEYo1osYdZES w7M6F9+jUaU0mHK5XXP6LjV3Yegcy3VfmAUaba02fpbWy4rvfnMwNAf4/kx2iw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1722246501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=scy5GNLyCVPvAA5J9VSYbLUa7zArNl9+ZZGGqimm8II=; b=S6CzZ6hFuRuyLA44FkWP9NNK027WOf/jj85WiBcXcJd+Wko7CrOWicWH/Nj6sVAq4Oo1vL Zm+pf4BEDC2LsBCw== To: Marc Zyngier Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Zhou Wang Subject: Re: [PATCH] irqchip/gic-v4: Fix ordering between vmapp and vpe locks In-Reply-To: <86y15k1wz3.wl-maz@kernel.org> References: <20240723175203.3193882-1-maz@kernel.org> <875xsrvpt3.ffs@tglx> <86y15k1wz3.wl-maz@kernel.org> Date: Mon, 29 Jul 2024 11:48:20 +0200 Message-ID: <87ttg88r6j.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240729_024822_459237_9015155B X-CRM114-Status: GOOD ( 11.66 ) 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 On Mon, Jul 29 2024 at 08:25, Marc Zyngier wrote: > On Fri, 26 Jul 2024 21:52:40 +0100, > Thomas Gleixner wrote: >> Confused. This changes the locking from unconditional to >> conditional. What's the rationale here? > > Haven't managed to sleep much, but came to the conclusion that I > wasn't that stupid in my initial patch. Let's look at the full > picture, starting with its_send_vmovp(): > > if (!its_list_map) { > its = list_first_entry(&its_nodes, struct its_node, entry); > desc.its_vmovp_cmd.col = &its->collections[col_id]; > its_send_single_vcommand(its, its_build_vmovp_cmd, &desc); > return; > } > > /* > * Protect against concurrent updates of the mapping state on > * individual VMs. > */ > guard(raw_spinlock_irqsave)(&vpe->its_vm->vmapp_lock); > > The vmapp locking *is* conditional. Which makes a lot of sense as the Misread the patch ...