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=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 4EC31C34033 for ; Tue, 18 Feb 2020 09:46:17 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id CDF992070B for ; Tue, 18 Feb 2020 09:46:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="VyGbrUNy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDF992070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 73A144A578; Tue, 18 Feb 2020 04:46:16 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ptLj33Ay6BzJ; Tue, 18 Feb 2020 04:46:15 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6A2E84AF12; Tue, 18 Feb 2020 04:46:15 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 543884A650 for ; Tue, 18 Feb 2020 04:46:14 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tCZpTntj0w04 for ; Tue, 18 Feb 2020 04:46:13 -0500 (EST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 64B354A578 for ; Tue, 18 Feb 2020 04:46:13 -0500 (EST) 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 417AD206E2; Tue, 18 Feb 2020 09:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582019172; bh=IMHp2n/+7oTwD0UMPuIj8WNmYZDuF7jfPDPHTkTYfds=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VyGbrUNyvk2JJyr92klamHD9Lto3mF5e88GAPxsdBirRnVEK+iEZjLdPSfdI9GqLk 3PdCSBYhoXLTi4LssEL5OsP7PB7OMmGExG/uRxgVBGspua2E3Kj4GQbt5N9MO/+Wij oOk4IwquRePoKh6l9ZL8TbQ5Vs0Bwet7Q+K/CNyw= 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 1j3zSE-006Bbs-Ih; Tue, 18 Feb 2020 09:46:10 +0000 MIME-Version: 1.0 Date: Tue, 18 Feb 2020 09:46:10 +0000 From: Marc Zyngier To: Zenghui Yu Subject: Re: [PATCH v4 06/20] irqchip/gic-v4.1: Add initial SGI configuration In-Reply-To: References: <20200214145736.18550-1-maz@kernel.org> <20200214145736.18550-7-maz@kernel.org> Message-ID: <4a64bf17c015cb10e62d9c1a1ff64db5@kernel.org> 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, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, jason@lakedaemon.net, rrichter@marvell.com, tglx@linutronix.de, eric.auger@redhat.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: Lorenzo Pieralisi , Jason Cooper , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Richter , Thomas Gleixner , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu Hi Zenghui, On 2020-02-18 07:25, Zenghui Yu wrote: > Hi Marc, [...] >> static void its_sgi_irq_domain_deactivate(struct irq_domain >> *domain, >> struct irq_data *d) >> { >> - /* Nothing to do */ >> + struct its_vpe *vpe = irq_data_get_irq_chip_data(d); >> + >> + vpe->sgi_config[d->hwirq].enabled = false; >> + its_configure_sgi(d, true); > > The spec says, when C==1, VSGI clears the pending state of the vSGI, > leaving the configuration unchanged. So should we first clear the > pending state and then disable vSGI (let E==0)? Right you are again. We need two commands, not just one (the pseudocode is pretty explicit). Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 AADAAC34026 for ; Tue, 18 Feb 2020 09:46:22 +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 7AD312070B for ; Tue, 18 Feb 2020 09:46:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xk1ovZXR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="VyGbrUNy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AD312070B 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=AUoSKcP/z42e9vRgNvLrbDrXSWXlbmG6bNGF88EzYt8=; b=Xk1ovZXRu0dQGJdlCsn6Cmb93 TnBg7ZgrnZAT/a2or/zI5i4RqdVJNohEJhh5n2cB3gOh1VRXwfy2ECaavOUaEY6xyMA/Lhm78vbVi Jn2nfG+h2wsbxY6DxgP+LnISGKcg8lbyED9gaYEmdhZGZWwt/2xAbUVgFcSpsQS6+qgzUZn/QLd7A rEbE+geQ+New2eRLub0sqt9+a03aoSTaPZD5N/QIxbwTtua/Bu+krBm30MawCk5BVs/c9u/P3+cxp SGaedNNfuyezOb4ePj5JRhfTeAcN8SveuqP0J6g0nwBuhcQmt9J+nw380424OC0z3s+ejg2mGFlfh nMF+/mUcQ==; 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 1j3zSL-00023W-Q7; Tue, 18 Feb 2020 09:46:17 +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 1j3zSH-00022d-0Z for linux-arm-kernel@lists.infradead.org; Tue, 18 Feb 2020 09:46:16 +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 417AD206E2; Tue, 18 Feb 2020 09:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582019172; bh=IMHp2n/+7oTwD0UMPuIj8WNmYZDuF7jfPDPHTkTYfds=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VyGbrUNyvk2JJyr92klamHD9Lto3mF5e88GAPxsdBirRnVEK+iEZjLdPSfdI9GqLk 3PdCSBYhoXLTi4LssEL5OsP7PB7OMmGExG/uRxgVBGspua2E3Kj4GQbt5N9MO/+Wij oOk4IwquRePoKh6l9ZL8TbQ5Vs0Bwet7Q+K/CNyw= 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 1j3zSE-006Bbs-Ih; Tue, 18 Feb 2020 09:46:10 +0000 MIME-Version: 1.0 Date: Tue, 18 Feb 2020 09:46:10 +0000 From: Marc Zyngier To: Zenghui Yu Subject: Re: [PATCH v4 06/20] irqchip/gic-v4.1: Add initial SGI configuration In-Reply-To: References: <20200214145736.18550-1-maz@kernel.org> <20200214145736.18550-7-maz@kernel.org> Message-ID: <4a64bf17c015cb10e62d9c1a1ff64db5@kernel.org> 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, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, jason@lakedaemon.net, rrichter@marvell.com, tglx@linutronix.de, eric.auger@redhat.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.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-20200218_014615_297375_23983344 X-CRM114-Status: UNSURE ( 9.49 ) X-CRM114-Notice: Please train this message. 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: Lorenzo Pieralisi , Jason Cooper , kvm@vger.kernel.org, Suzuki K Poulose , linux-kernel@vger.kernel.org, Eric Auger , Robert Richter , James Morse , Julien Thierry , Thomas Gleixner , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.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-18 07:25, Zenghui Yu wrote: > Hi Marc, [...] >> static void its_sgi_irq_domain_deactivate(struct irq_domain >> *domain, >> struct irq_data *d) >> { >> - /* Nothing to do */ >> + struct its_vpe *vpe = irq_data_get_irq_chip_data(d); >> + >> + vpe->sgi_config[d->hwirq].enabled = false; >> + its_configure_sgi(d, true); > > The spec says, when C==1, VSGI clears the pending state of the vSGI, > leaving the configuration unchanged. So should we first clear the > pending state and then disable vSGI (let E==0)? Right you are again. We need two commands, not just one (the pseudocode is pretty 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 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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 68B91C34026 for ; Tue, 18 Feb 2020 09:46:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3427421D7D for ; Tue, 18 Feb 2020 09:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582019176; bh=IMHp2n/+7oTwD0UMPuIj8WNmYZDuF7jfPDPHTkTYfds=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=QSL0XLEKYe4ec5hvO9JwKMyP5U1+bufp0uE8XyVLuqDzMLhZwMP3QipBnY+T/BGef AwGF318I5A23J0xB1/3LREsQlv6pNrkU+xGhzko7Nw6W9fcy5wp3KDmwe0U4vh6RCI 6uZTSzVqIxN4/IvJYPofOBItiv1K+WKMC2fxTqVA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726383AbgBRJqN (ORCPT ); Tue, 18 Feb 2020 04:46:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:46950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbgBRJqM (ORCPT ); Tue, 18 Feb 2020 04:46:12 -0500 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 417AD206E2; Tue, 18 Feb 2020 09:46:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582019172; bh=IMHp2n/+7oTwD0UMPuIj8WNmYZDuF7jfPDPHTkTYfds=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VyGbrUNyvk2JJyr92klamHD9Lto3mF5e88GAPxsdBirRnVEK+iEZjLdPSfdI9GqLk 3PdCSBYhoXLTi4LssEL5OsP7PB7OMmGExG/uRxgVBGspua2E3Kj4GQbt5N9MO/+Wij oOk4IwquRePoKh6l9ZL8TbQ5Vs0Bwet7Q+K/CNyw= 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 1j3zSE-006Bbs-Ih; Tue, 18 Feb 2020 09:46:10 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 18 Feb 2020 09:46:10 +0000 From: Marc Zyngier To: Zenghui Yu Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Lorenzo Pieralisi , Jason Cooper , Robert Richter , Thomas Gleixner , Eric Auger , James Morse , Julien Thierry , Suzuki K Poulose Subject: Re: [PATCH v4 06/20] irqchip/gic-v4.1: Add initial SGI configuration In-Reply-To: References: <20200214145736.18550-1-maz@kernel.org> <20200214145736.18550-7-maz@kernel.org> Message-ID: <4a64bf17c015cb10e62d9c1a1ff64db5@kernel.org> 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, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, lorenzo.pieralisi@arm.com, jason@lakedaemon.net, rrichter@marvell.com, tglx@linutronix.de, eric.auger@redhat.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi Zenghui, On 2020-02-18 07:25, Zenghui Yu wrote: > Hi Marc, [...] >> static void its_sgi_irq_domain_deactivate(struct irq_domain >> *domain, >> struct irq_data *d) >> { >> - /* Nothing to do */ >> + struct its_vpe *vpe = irq_data_get_irq_chip_data(d); >> + >> + vpe->sgi_config[d->hwirq].enabled = false; >> + its_configure_sgi(d, true); > > The spec says, when C==1, VSGI clears the pending state of the vSGI, > leaving the configuration unchanged. So should we first clear the > pending state and then disable vSGI (let E==0)? Right you are again. We need two commands, not just one (the pseudocode is pretty explicit). Thanks, M. -- Jazz is not dead. It just smells funny...