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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7A2CC636D3 for ; Tue, 7 Feb 2023 17:06:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 827A785EB7; Tue, 7 Feb 2023 18:06:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="WyMl5sC0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5DA2485EB8; Tue, 7 Feb 2023 18:06:47 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2BE2685EB0 for ; Tue, 7 Feb 2023 18:06:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=maz@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 961DB60F3B; Tue, 7 Feb 2023 17:06:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A6EAC433EF; Tue, 7 Feb 2023 17:06:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675789602; bh=KApS8lPExp54spbHecr+GoX0WyWa+nU6myRl6UOpHBc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WyMl5sC0zAwFRDBWqJzMbASAaf4CZ1i2WoPr9ATpIh+V5OGHBr387jLssI89ZNt6+ nABUFEejtJUO9Q0KLTXANcZlPXW/+33t7VGofW2//94IR0xNhC4Ne4MifmScxwuuUI RO+7NF9Ze4saOokaopUAcm3Q8uzgvp02e3XBVCma+TDz31QT5x+XVVGsspslnhsm1O bmft+efa9aEAnKKR83KBGOP81AHJNAkTDmTVx8egvPjLg83BYkhu1e9l5RtNakrckm yJ9Nitqare+I/pu9mWMf0ExIuggicHiShLOE+tyQJk8nFe1ZdGdUYL678AlO0eczZ+ wFmTMBh7iVq4g== 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 1pPRQV-008QUy-Gp; Tue, 07 Feb 2023 17:06:39 +0000 Date: Tue, 07 Feb 2023 17:06:39 +0000 Message-ID: <86pmalz9pc.wl-maz@kernel.org> From: Marc Zyngier To: Tom Rini Cc: "Ying-Chun Liu (PaulLiu)" , u-boot@lists.denx.de, Will Deacon Subject: Re: [PATCH 1/2] arm: cpu: Add optional CMOs by VA In-Reply-To: References: <20230207162014.58664-1-paul.liu@linaro.org> <20230207162014.58664-2-paul.liu@linaro.org> <0acfdc333e22249784b4abd63d8d09e6@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/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) 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: trini@konsulko.com, paul.liu@linaro.org, u-boot@lists.denx.de, willdeacon@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-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Tue, 07 Feb 2023 16:40:05 +0000, Tom Rini wrote: > > On Tue, Feb 07, 2023 at 04:35:25PM +0000, Marc Zyngier wrote: > > On 2023-02-07 16:20, Ying-Chun Liu (PaulLiu) wrote: > > > Exposing set/way cache maintenance to a virtual machine is unsafe, not > > > least because the instructions are not permission-checked but also > > > because they are not broadcast between CPUs. Consequently, KVM traps and > > > emulates such maintenance in the host kernel using by-VA operations and > > > looping over the stage-2 page-tables. However, when running under > > > protected KVM, these instructions are not able to be emulated and will > > > instead result in an exception being delivered to the guest. > > > > > > Introduce CONFIG_CMO_BY_VA_ONLY so that virtual platforms can select > > > this option and perform by-VA cache maintenance instead of using the > > > set/way instructions. > > > > > > Signed-off-by: Ying-Chun Liu (PaulLiu) > > > Signed-off-by: Marc Zyngier > > > Signed-off-by: Will Deacon > > > Cc: Tom Rini > > > > The sign-off chain looks pretty odd. Either you are the author > > of this patch, and I have nothing to do on the sign-off list, > > or I'm the author and the authorship is wrong. Similar things > > would apply for Will. > > > > So which one is it? > > As my first guess here is copy and adopting code from Linux, this is > not following the documented procedure here: > https://u-boot.readthedocs.io/en/latest/develop/sending_patches.html#attributing-code-copyrights-signing > > Which if not sufficiently clear, please ask / suggest changes to. I see > right now it isn't specific about cc'ing the original authors (who may, > or may not, be interested, so blanket policy doesn't apply) but I would > hope is clear enough that what's done in this example isn't right. No, this really is u-boot code written as part of Android, from where the patch has been directly lifted[1]. Same goes for Pierre-Clement's patch that is part of the same series. I'm not overly attached to this code (I have bad memories from it), but I think the OP may be unaware of these rules. In any case, I'm supportive of this code making it in upstream u-boot. I just want it to be done correctly. Thanks, M. [1] https://android.googlesource.com/platform/external/u-boot/+/db5507f47f4f57f766d52f753ff2cc761afc213b -- Without deviation from the norm, progress is not possible.