Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp243067lqs; Tue, 5 Mar 2024 00:01:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVjsE8rlVCoLBmdcCMcoPtWC0RMbD6X36HbMXxBDIwLueMRUJ6b2JdyaLW24msEKxbjVbVblSbW+DMBn35x6ns4CK6frJJdSMWFib+qCw== X-Google-Smtp-Source: AGHT+IFlYGdZIyt2zfPowX/NArNSNLW02IbbOGUlnkMdnRgy5brVFC2F/vJQX1HmwkK/uHwSqWa7 X-Received: by 2002:a0c:f50a:0:b0:690:4d5d:e566 with SMTP id j10-20020a0cf50a000000b006904d5de566mr1205907qvm.23.1709625666300; Tue, 05 Mar 2024 00:01:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709625666; cv=pass; d=google.com; s=arc-20160816; b=sCqQObjoyyBJVBgawh0RDVPD8Vd+IjD4YHDJvCGSdSUdnLk899z58T8kPWuAy1IxEp 2jP/rZQJzjI2gDardKiYNic38YuyvU9oBnRVq/gR4TkXTSmIB457/v91scypXLxGKwhM eg4IcVGdA1nBbAXlWLnABd5CdePtZNP1LGZCzolZYjqJPVEwh0JH2LvOtrCvOOzw7n6O s5IQ28HyjIiPC1X2vaSbRRnEg53R+L1WUdmCytu6LrInNoZ/To3AEzv1bCWW12Zkt/yf N7GLZhYEUMDs9RoWjILvSLiNCkmK3jLMiEYrrSiyyGytNk1j3YzHFDz1neRGrZyfi26x JCwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gWFAJuQry3gzF9uH7O4D0aDTDmuwfZxjmqEXA+RPFLQ=; fh=wLcLyJBEDleuqgKdkhzrknB2EoFPY+DkyDxNH25ULj8=; b=fFypcXNz5aF91XbvZJttpkWMSjAphw0jxFvEPIPJafV+DLvK+34HTIY/+/aoP0vGx3 Bg/nDzgoBasDw6CJiFfq4Yzk83GHVXR19yLXbCdUrwZbvUEwys5xzz/7znM8N2sBwtyW D5dks/Zz08TX/0xDjhDbG5lN6n2+CpLydFlE3tVX4XSEJap5VD3aIBAKgXPWIy3NUQC5 FshaZnz4eV4bfuhf+LYE5KYJzL4qmvGBPwPgYs3FII8eha5yx+BYTBDcso/NfDSo/P2G wbvAS5xxml+H6BjKv8WWp0e2lDVyC0GgXRuevkXqpVxV2YlA6JeWfyq1tZU5atgiZxU+ gp4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=opMY1aLN; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-91860-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id k2-20020ad45be2000000b0068cb91fb68csi11868554qvc.185.2024.03.05.00.01.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:01:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91860-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=opMY1aLN; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-91860-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91860-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 186861C22643 for ; Tue, 5 Mar 2024 08:00:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E9D87EF0A; Tue, 5 Mar 2024 08:00:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="opMY1aLN" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 AC1B17E112; Tue, 5 Mar 2024 08:00:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625644; cv=none; b=U4rC/ACO2n9DYvPZ4yhnkL0RPfEzGiQL8LlO/r25hHs5026kg6viKi4NtEII2qD0wnpmDZ1OSyUsCVEuaP4zft/Exj+OLusugU8EOJ7w5qtVnthaeZretryR7LKqMYSG0WyGI0oYhoakHybKpZo1km2gIVgkP+EPdRh/In45DSA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709625644; c=relaxed/simple; bh=gWFAJuQry3gzF9uH7O4D0aDTDmuwfZxjmqEXA+RPFLQ=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tHIYPS4rxGfLf7JWMXIlQ/Wer4AP6eT0VStuz81scm2X7BgVUWRY4beyPZxcjCs4Arzw2QouIboifsr2HyT6d2n0V/R9mTBGdaA2JgRKpfcbIXgcbXIi26TsKPVpsYyYMkHr8trYuySSMlFXBwnRSeaOxSNpKntaXv24S0+ScPc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=opMY1aLN; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1709625642; x=1741161642; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=gWFAJuQry3gzF9uH7O4D0aDTDmuwfZxjmqEXA+RPFLQ=; b=opMY1aLNw84azCOOm8MEYFUR9SZu+S3Jh4uNPHhqXfHjqtH6yEWmcEiw LBsMzMo0zZKVjq+OUSalP0h/X9mgVnfNAgD7wDQIGHa2SziI95xhErfmW C7x6BnkI+nLz+BQ5gP60ekZ7zbmAZIfytiJhYHLhFQInuwhBkqALjjiYA XF3kYa+PsSLH8I4+5h6fx4YgRPlcEfOG45yXzTacO8JyNDyAxA7f02nuZ WTnDx/YHog+JOukD9Btfi5PjFvtwPCBuhejL88FEnzCeK4jXHIlv9+T6O SYoUHg7qbMx8XHjjOYsKuenwHHDZ8xoIbsbOxm49eC45cyU8dnkEm2XBI w==; X-CSE-ConnectionGUID: aFDr3hW/QMqfVKlnMUlmNA== X-CSE-MsgGUID: 6fJ54n74SV+WjGmrURhuaQ== X-IronPort-AV: E=Sophos;i="6.06,205,1705388400"; d="asc'?scan'208";a="18837278" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 05 Mar 2024 01:00:35 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 5 Mar 2024 01:00:24 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 5 Mar 2024 01:00:21 -0700 Date: Tue, 5 Mar 2024 07:59:37 +0000 From: Conor Dooley To: Anup Patel CC: =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Conor Dooley , Alexandre Ghiti , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrea Parri , Samuel Holland , Steven Rostedt , Masami Hiramatsu , Mark Rutland , , , , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Andrea Parri Subject: Re: [PATCH v3 2/2] riscv: Fix text patching when IPI are used Message-ID: <20240305-sarcasm-ending-0f7946490aea@wendy> References: <20240229121056.203419-1-alexghiti@rivosinc.com> <20240229121056.203419-3-alexghiti@rivosinc.com> <20240304-makeshift-bakeshop-26c9611de1a3@spud> <87msrdzqxi.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ofyVMJD7bERZqUGb" Content-Disposition: inline In-Reply-To: --ofyVMJD7bERZqUGb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 05, 2024 at 08:33:30AM +0530, Anup Patel wrote: > On Tue, Mar 5, 2024 at 1:54=E2=80=AFAM Bj=C3=B6rn T=C3=B6pel wrote: > > > > Conor Dooley writes: > > > > > On Thu, Feb 29, 2024 at 01:10:56PM +0100, Alexandre Ghiti wrote: > > >> For now, we use stop_machine() to patch the text and when we use IPI= s for > > >> remote icache flushes (which is emitted in patch_text_nosync()), the= system > > >> hangs. > > >> > > >> So instead, make sure every CPU executes the stop_machine() patching > > >> function and emit a local icache flush there. > > >> > > >> Co-developed-by: Bj=C3=B6rn T=C3=B6pel > > >> Signed-off-by: Bj=C3=B6rn T=C3=B6pel > > >> Signed-off-by: Alexandre Ghiti > > >> Reviewed-by: Andrea Parri > > > > > > What commit does this fix? > > > > Hmm. The bug is exposed when the AIA IPI are introduced, and used > > (instead of the firmware-based). > > > > I'm not sure this is something we'd like backported, but rather a > > prerequisite to AIA. > > > > @Anup @Alex WDYT? > > >=20 > The current text patching never considered IPIs being injected > directly in S-mode from hart to another so we are seeing this > issue now with AIA IPIs. >=20 > We certainly don't need to backport this fix since it's more > of a preparatory fix for AIA IPIs. Whether or not this is backportable, if it fixes a bug, it should get a Fixes: tag for the commit that it fixes. Fixes: isn't "the backport" tag, cc: stable is. --ofyVMJD7bERZqUGb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZebQ6QAKCRB4tDGHoIJi 0qg3AQD+yvdHglvWYh8y5lWj9K/+QDa9GdWm0cjqVDuvHYScUgD9FI61pKq1ci91 LXvSARs1oJvF0xK/zbm2iRwaXt4gCAw= =F+Fw -----END PGP SIGNATURE----- --ofyVMJD7bERZqUGb--