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 0FA6CCD128A for ; Wed, 3 Apr 2024 10:10:20 +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:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Gg9eGlxvUpoji+wqcgkghrpmoirMK7nz7TnOXsMvGow=; b=gO4uqGJYWY3lWT Ddh7jfffTHKLU9E9wOkY+bz4XY5Ps4Oo99Cn67y4Pc34capHMvPprtMCb4VC9hHtpDqVWeaEwW2IX TGarYZXk0j+UWVNuXg/XIDoqluhKDcv6KfnxFcbM6etF12+/8/bUaiFViRtGnf/4GCk5Ju1eyqouJ XIRF+hsSWie7uIIp9XG606wjdIGmv0X6SPocZcA1KBx5uaIaMgUfC8/krTiP6n+i1ceklTQC0c/TK 9uqwPNdvZ2qqsLcVVdrUMqPr3cNGex4xEmIQfr9EGlSokcP2WlxfAxA+6SCPu4fPpHeXhGMJZWR5H 3nKLj94f54S9LdHR1vIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrxZF-0000000FP4X-1QW9; Wed, 03 Apr 2024 10:10:05 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrxZC-0000000FP2q-1lsr for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2024 10:10:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 78F7FCE21CE; Wed, 3 Apr 2024 10:10:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A70FC433F1; Wed, 3 Apr 2024 10:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712138999; bh=hxisYTtqHS0PgSLllLBFMBX8OHBg9yUGMbWMb7P2n4Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=avnjnlHHCpktGusaWZ+BxlVSqNE4lgl1pOwyrB5ahxSzLBgF7EfbY/sZFXjRdZWAx mvy3FVtCcVie+vKHkQ+zx3bddWhICRdSJc+MiTEVu3wa05/pbaMcE0+4kWk8CN0t9z c9a5SRlNEgEsyrNn22q53BGfqAKN0ohKjxyVyanU1O5+auca1Jjn1/g+u1mKKW7Cpw QTTAgtKI407kDOi1Y6+hd06oYnNRwBOkta3viy6DobXsBvcnKcCjC6e6JVycSMjMwg 7hU5WQPijaobrcDEBjxLVpdB2+q7e7m4jd4uMBOZYPmDCTLZXI3C4Tja371id/oeAH 2R+tB9CMpJzcg== 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 1rrxZ7-0012Sl-96; Wed, 03 Apr 2024 11:09:57 +0100 Date: Wed, 03 Apr 2024 11:09:56 +0100 Message-ID: <86cyr6u58r.wl-maz@kernel.org> From: Marc Zyngier To: t00849498 Cc: , , , , Subject: Re: [RESPIN PATCH] irqchip/gic-v3-its:Fix GICv4.1 needless VSYNC after unmap VPE In-Reply-To: <20240403083556.3862236-1-tangnianyao@huawei.com> References: <20240403083556.3862236-1-tangnianyao@huawei.com> 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.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: tangnianyao@huawei.com, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, guoyang2@huawei.com, wangwudi@hisilicon.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-20240403_031002_847876_36AE0354 X-CRM114-Status: GOOD ( 16.75 ) 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 Thanks for respinning this. A few remarks: The subject line could be improved. Something like: "irqchip/gic-v4: Don't issue a VSYNC after VMAPP with V=0" On Wed, 03 Apr 2024 09:35:56 +0100, t00849498 wrote: > > From: Nianyao Tang > > Quote from GIC spec 5.3.19, a VMAPP with {V, Alloc}=={0, x} > is self-synchronizing, This means the ITS command queue does not > show the command as consumed until all of its effects are completed. Since this is a direct quote, make it clear that it is so. > > We don't need VSYNC to guarantee unmap finish. And VSYNC after unmap VPE > will reach an invalid vpe table entry, which may trigger exception > like SError or RAS. Let's fix it. This should be much stronger. It's not that we don't need VSYNC. It is that VSYNC is actively wrong. I suggest that you rewrite the commit message along these lines: As per the GICv4.1 spec (Arm IHI 0069H, 5.3.19): "A VMAPP with {V, Alloc}=={0, x} is self-synchronizing. This means the ITS command queue does not show the command as consumed until all of its effects are completed." Furthermore, VSYNC is allowed to deliver an SError when referencing a non existent VPE. By these definitions, a VMAPP followed by a VSYNC is a bug, as the later references a VPE that has been unmapped by the former. Fix it by eliding the VSYNC in this scenario. > > Signed-off-by: Nianyao Tang Please also add: Fixes: 64edfaa9a234 ("irqchip/gic-v4.1: Implement the v4.1 flavour of VMAPP") With the above fixed: Reviewed-by: Marc Zyngier Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel