Received: by 2002:a05:7412:8d08:b0:f9:2d0a:d759 with SMTP id bj8csp239603rdb; Sun, 17 Dec 2023 09:34:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPn3HwXEta2XNKoEAnYo4FiM8bsT/OdvowrSMI22UJYUV9cuwFgSBjiJhMyOpEjgcyllcZ X-Received: by 2002:a05:6e02:3a81:b0:35f:80ec:1449 with SMTP id cr1-20020a056e023a8100b0035f80ec1449mr8386394ilb.14.1702834492716; Sun, 17 Dec 2023 09:34:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702834492; cv=none; d=google.com; s=arc-20160816; b=uOq2Aw9rwamO48wDbxrE/q11GCz2ANFQtccRgh+LNFpMpyewpLCGRHImoTAwei2qWT 8mFHH0029QTmn+zAYvELeKIRx429aJ2NKwRNPEy6sGG2Reg14boEg2otVVWe0Yb0xyJl UHEPqytmctF91YV0WJFYERBK/3aMvl+xXr2yngLKv8Ya3e5jdlZXowkGr/mDqQ3C3hDD XEn20KHy4Y31d53jRcT7+BxEFEWZ0F6hSP3pi9CKGh0Be1eCKX4A07NvG0z8VL7tFRjO gwOBi2ya0fSPiNbV5acxcM7SRWs6RyHpijxVnuaZ2gb9CbQOQ9tcDJOYTnOkOg8Owb3g OtJw== ARC-Message-Signature: i=1; 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:dkim-signature:date; bh=tMaWKK6aNhEcNfGg2LkGPbfORjqRLPRkKIISdX758Xs=; fh=PPS7r75Er+86of0ZGKnin0zZdsUZtJPCOT+z8FcvOo4=; b=QAFUn1D7Qrn98kAB2tktb/KoeJLXoSL2iF/8teXDHyfZq3FZp8lMkF+XJ8m81x1Fxl HWVpW1tpO+8lJzVA7JvqpVarrg6RARwWWDuK2Z2pTStyFnugvCaepyRaN8uriQwU1qIL s0Vp6uJdUnbp82XDW9G9ZqPjiu+OEHSEv0Rk0af4E0ktocfXJLfp7L/P3m+2Y+eMfdGk Wz7ew64YEMIqrBZSDtznaH1oXlnZi3tME0CaHngtPdaHuaZjpeGLYNolJln2u1Dnyh8M 9TBoDXVURWdaJLxBALWA0D1Qgpg88a76T/Lka3uG1aNR7v8giHE1TaqFtqOIqVFvFwPA ILZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DwF57sKL; spf=pass (google.com: domain of linux-kernel+bounces-2744-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2744-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g2-20020a1709026b4200b001d2f0bf3dccsi15397941plt.273.2023.12.17.09.34.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 09:34:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2744-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DwF57sKL; spf=pass (google.com: domain of linux-kernel+bounces-2744-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2744-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5F0E5281415 for ; Sun, 17 Dec 2023 17:34:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81D0446453; Sun, 17 Dec 2023 17:34:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="DwF57sKL" X-Original-To: linux-kernel@vger.kernel.org Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 53D5C4643C for ; Sun, 17 Dec 2023 17:34:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Sun, 17 Dec 2023 17:34:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1702834483; 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=tMaWKK6aNhEcNfGg2LkGPbfORjqRLPRkKIISdX758Xs=; b=DwF57sKLMND/XMkN6KaeRPN8526vV2qSNpsGgPACgycdjmXJwmSQ41nD7AXG5J900WS2dQ ALV9Zcgid8ICXaFBUgWjFDD2HYgIjQv0mp7J9YXhF1LgCI4z4odlb2nulN0SYA3D5mKM26 45jlUdzYlJb2uwbzE4u2EBVCulRwlZw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier Cc: Kunkun Jiang , James Morse , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Jean-Philippe Brucker , "moderated list:ARM SMMU DRIVERS" , kvmarm@lists.linux.dev, open list , "wanghaibin.wang@huawei.com" Subject: Re: [bug report] GICv4.1: vSGI remains pending across the guest reset Message-ID: References: <7e7f2c0c-448b-10a9-8929-4b8f4f6e2a32@huawei.com> <87a5q983zc.wl-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT On Sun, Dec 17, 2023 at 05:33:16PM +0000, Oliver Upton wrote: > On Sun, Dec 17, 2023 at 11:26:15AM +0000, Marc Zyngier wrote: > > [...] > > > But this has *nothing* to do with the guest. This is the *host* > > userspace performing a write to the redistributor view, which has > > different semantics. Which is why your earlier description made no > > sense to me. > > > > I think the problem is slightly larger than what you describe. A write > > to ISPENDR0 should be propagated to the ITS for any values of the > > latch, just like this happens on enabling HW-backed SGIs. > > > > Can you please give this a go? > > What do you think about using this as an opportunity for a bit of > cleanup? It'd be nice unify the various MMIO and uaccess handlers for > SPENDING + CPENDING while being careful about the arch_timer interrupt. Cut myself off... Meant to say that user writes to SPENDING for GICv3 can then be treated as: > clear = ~val; > vgic_uaccess_write_spending(val); > vgic_uaccess_write_cpending(clear); -- Thanks, Oliver