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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 470C3C35DEB for ; Mon, 24 Feb 2020 23:47:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 150DF2176D for ; Mon, 24 Feb 2020 23:47:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cuZdNW1T"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="d4bdpUEo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 150DF2176D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WhOr8wlZxb1pJJ8J9vPIyWtBPqRaRMCR9nCTe32I8n4=; b=cuZdNW1TIH+AZspccxnsTMd79 kz2rNbn1TcJ9Jo8DhUPKhH5gyBVOmlqS0rmfLXW4Zlk028leTJOJFVwOzcLqBGvtb4S4UQa+7ZMni 3SH068f+XMV7CFLNq+FtCgZgvmgJPv6ZohIppEM83wIlzrkPoCF/ZDTf3xI/w9o639ULCrwhyyzr7 McteZ5zoVGZOXEEPhdOuV3rs6TCLjpj8WU+C/WgSoZdh6QpSd7IxwPGEz6zgIEBASkr7f87MvEhzV jYFguhfvU8sj2hCRY6FZ8Pno0WpA/UrBYPtwE30oDfLwcZTBagB2/UsBfufTy+3M1fzrC5uv2r9Wn mqFp4pTiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6NS0-0007JA-BZ; Mon, 24 Feb 2020 23:47:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6NRx-0007In-GA for linux-arm-kernel@lists.infradead.org; Mon, 24 Feb 2020 23:47:46 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B20512176D; Mon, 24 Feb 2020 23:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582588064; bh=/n/ld7pGO6VfKm6KFJGv3owq/0ZZ5rbRhDEektoQtMg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=d4bdpUEoxsXsiOQwhLaGxmXFFebooW84w5sMWUW8znmIGzDsOaI88EsxYF44NM13U q7OEU/H1tCMzwPy7WHbjkKF1Qd9nlG2XUYTqep75eN7KMri4pkcx2TKryMrmQs31ER mh42sauNuo7wznRqeE2QFiVMxWc5c55Qr50pxu9s= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j6NRu-007gKg-QY; Mon, 24 Feb 2020 23:47:42 +0000 MIME-Version: 1.0 Date: Mon, 24 Feb 2020 23:47:42 +0000 From: Marc Zyngier To: Zenghui Yu Subject: Re: [PATCH] irqchip/gic-v3-its: Clear Valid before writing any bits else in VPENDBASER In-Reply-To: <20200224025029.92-1-yuzenghui@huawei.com> References: <20200224025029.92-1-yuzenghui@huawei.com> Message-ID: X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/1.3.10 X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, wanghaibin.wang@huawei.com, jiayanlei@huawei.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-20200224_154745_563534_7167EB35 X-CRM114-Status: GOOD ( 12.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wanghaibin.wang@huawei.com, Yanlei Jia , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Zenghui, On 2020-02-24 02:50, Zenghui Yu wrote: > The Valid bit must be cleared before changing anything else when > writing > GICR_VPENDBASER to avoid the UNPREDICTABLE behavior. This is exactly > what > we've done on 32bit arm, but not on arm64. I'm not quite sure how you decide that Valid must be cleared before changing anything else. The reason why we do it on 32bit is that we cannot update the full 64bit register at once, so we start by clearing Valid so that we can update the rest. arm64 doesn't require that. For the rest of discussion, let's ignore GICv4.1 32bit support (I'm pretty sure nobody cares about that). > This works fine on GICv4 where we only clear Valid for a vPE > deschedule. > With the introduction of GICv4.1, we might also need to talk something > else > (e.g., PendingLast, Doorbell) to the redistributor when clearing the > Valid. > Let's port the 32bit gicr_write_vpendbaser() to arm64 so that hardware > can > do the right thing after descheduling the vPE. The spec says that: "For a write that writes GICR_VPENDBASER.Valid from 1 to 0, if GICR_VPENDBASER.PendingLast is written as 1 then GICR_VPENDBASER.PendingLast takes an UNKNOWN value and GICR_VPENDBASER.Doorbell is treated as being 0." and "When GICR_VPENDBASER.Valid is written from 1 to 0, if there are outstanding enabled pending interrupts GICR_VPENDBASER.Doorbell is treated as 0." which indicate that PendingLast/Doorbell have to be written at the same time as we clear Valid. Can you point me to the bit of the v4.1 spec that makes this "clear Valid before doing anything else" requirement explicit? Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel