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=-6.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 B3960C35254 for ; Wed, 5 Feb 2020 12:43:57 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 43E432082E for ; Wed, 5 Feb 2020 12:43:57 +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="ICzBZX/J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 43E432082E 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 BC7EB4A94D; Wed, 5 Feb 2020 07:43:56 -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 srfPXtByOqTJ; Wed, 5 Feb 2020 07:43:55 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id BDF394A4E5; Wed, 5 Feb 2020 07:43:55 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 25D794A4E5 for ; Wed, 5 Feb 2020 07:43:55 -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 m-CtCjofkGCf for ; Wed, 5 Feb 2020 07:43:54 -0500 (EST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id E0B124A49F for ; Wed, 5 Feb 2020 07:43:53 -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 BE8D720674; Wed, 5 Feb 2020 12:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580906632; bh=0nhgLoKBd1xmo2Khpi4Cvrfth35BI8Ya1ztqYzurtSM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ICzBZX/JpwWLiHlmX/jL53ordUZGAjB3KgThNSGl7YnfS+Km/wWA9MXDeaLBS9Xta gGo1PV4ZFrDtjw6ClU4/t2BIFlGX7Wfm6ErX7tcYlvNUnnFNf5xj3BJOcCBAInbLY+ tAG0Jvn/abpxb0agK7YlmJQOt1cMwzaNZI+xBo8E= 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 1izK23-00386f-1b; Wed, 05 Feb 2020 12:43:51 +0000 MIME-Version: 1.0 Date: Wed, 05 Feb 2020 12:43:51 +0000 From: Marc Zyngier To: Zenghui Yu Subject: Re: [PATCH 1/5] irqchip/gic-v4.1: Fix programming of GICR_VPROPBASER_4_1_SIZE In-Reply-To: <20200204090940.1225-2-yuzenghui@huawei.com> References: <20200204090940.1225-1-yuzenghui@huawei.com> <20200204090940.1225-2-yuzenghui@huawei.com> Message-ID: <29e6c483b71dcf28e9b140f4edfe566d@kernel.org> X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/1.3.8 X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, tglx@linutronix.de, jason@lakedaemon.net, wanghaibin.wang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: jason@lakedaemon.net, linux-kernel@vger.kernel.org, tglx@linutronix.de, 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 On 2020-02-04 09:09, Zenghui Yu wrote: > The Size field of GICv4.1 VPROPBASER register indicates number of > pages minus one and together Page_Size and Size control the vPEID > width. Let's respect this requirement of the architecture. > > Signed-off-by: Zenghui Yu > --- > drivers/irqchip/irq-gic-v3-its.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-gic-v3-its.c > b/drivers/irqchip/irq-gic-v3-its.c > index e5a25d97f8db..992bc72cab6f 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -2531,7 +2531,7 @@ static int allocate_vpe_l1_table(void) > npg = 1; > } > > - val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, npg); > + val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, npg - 1); > > /* Right, that's the number of CPU pages we need for L1 */ > np = DIV_ROUND_UP(npg * psz, PAGE_SIZE); Indeed, nice catch. 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=-4.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,URIBL_DBL_ABUSE_MALW 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 CBF17C352A1 for ; Wed, 5 Feb 2020 12:43:58 +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 A278821927 for ; Wed, 5 Feb 2020 12:43:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jbTGCrr6"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ICzBZX/J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A278821927 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=vH2RIN2RGCUr+JxoK3ZagIqKPUuc9bqy+Vq42xqA6YQ=; b=jbTGCrr6zK4KExKq9dCJKgs4L ZCp7JpLgLmo8tdUyteT7fEY1xLpsrUMOKNpjxCQm+H3nsyAOzjP7IEnhwkMpVY22YIynkdvs8j1Hv tEMTFHL//AlK8s/LokDZqOQFFZwYn/Ykv1DZQmeFN1FHYiM1sLkOUdLqDPtSfJ87X09VDXllPI7hY QTZu03OmTvh/8nnPiDefIXlfIsrQRkO30mef537u012dE0x+Ju+hHfO0DMKi6lxiFKyG4jwfCPRH+ XiK6BDurZ6q84CUaRBMcrxuLY9ENHX9UDcfqxg7zofnJq1tXY0YsQJHqQg/BV8xRtQRlvauLRkI5+ Nm+s0tDSA==; 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 1izK28-00005F-H2; Wed, 05 Feb 2020 12:43:56 +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 1izK25-0008U2-JE for linux-arm-kernel@lists.infradead.org; Wed, 05 Feb 2020 12:43:54 +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 BE8D720674; Wed, 5 Feb 2020 12:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580906632; bh=0nhgLoKBd1xmo2Khpi4Cvrfth35BI8Ya1ztqYzurtSM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ICzBZX/JpwWLiHlmX/jL53ordUZGAjB3KgThNSGl7YnfS+Km/wWA9MXDeaLBS9Xta gGo1PV4ZFrDtjw6ClU4/t2BIFlGX7Wfm6ErX7tcYlvNUnnFNf5xj3BJOcCBAInbLY+ tAG0Jvn/abpxb0agK7YlmJQOt1cMwzaNZI+xBo8E= 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 1izK23-00386f-1b; Wed, 05 Feb 2020 12:43:51 +0000 MIME-Version: 1.0 Date: Wed, 05 Feb 2020 12:43:51 +0000 From: Marc Zyngier To: Zenghui Yu Subject: Re: [PATCH 1/5] irqchip/gic-v4.1: Fix programming of GICR_VPROPBASER_4_1_SIZE In-Reply-To: <20200204090940.1225-2-yuzenghui@huawei.com> References: <20200204090940.1225-1-yuzenghui@huawei.com> <20200204090940.1225-2-yuzenghui@huawei.com> Message-ID: <29e6c483b71dcf28e9b140f4edfe566d@kernel.org> X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/1.3.8 X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, tglx@linutronix.de, jason@lakedaemon.net, wanghaibin.wang@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-20200205_044353_662173_3899B425 X-CRM114-Status: GOOD ( 13.00 ) 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: jason@lakedaemon.net, linux-kernel@vger.kernel.org, wanghaibin.wang@huawei.com, tglx@linutronix.de, 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 On 2020-02-04 09:09, Zenghui Yu wrote: > The Size field of GICv4.1 VPROPBASER register indicates number of > pages minus one and together Page_Size and Size control the vPEID > width. Let's respect this requirement of the architecture. > > Signed-off-by: Zenghui Yu > --- > drivers/irqchip/irq-gic-v3-its.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-gic-v3-its.c > b/drivers/irqchip/irq-gic-v3-its.c > index e5a25d97f8db..992bc72cab6f 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -2531,7 +2531,7 @@ static int allocate_vpe_l1_table(void) > npg = 1; > } > > - val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, npg); > + val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, npg - 1); > > /* Right, that's the number of CPU pages we need for L1 */ > np = DIV_ROUND_UP(npg * psz, PAGE_SIZE); Indeed, nice catch. 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=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 F1212C35254 for ; Wed, 5 Feb 2020 12:43:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C699A22B48 for ; Wed, 5 Feb 2020 12:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580906634; bh=0nhgLoKBd1xmo2Khpi4Cvrfth35BI8Ya1ztqYzurtSM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=1Xaj593UIWX7UlT/TpA6rto6yW0VWGvWgrXr/cMeVl7UeAL0cX25h4mDHdRWxwZgk 1TulS0U6hMFRD9jiCDMXyWtLnpjaVfijK6WQcT1YVVBdkya6eHpzZNnEYFZAmsvGqb WFBPyBbe+2RKPeO3yEeci3R1DT7x8GIWx0A1SyzI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727861AbgBEMnx (ORCPT ); Wed, 5 Feb 2020 07:43:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:42710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726960AbgBEMnx (ORCPT ); Wed, 5 Feb 2020 07:43:53 -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 BE8D720674; Wed, 5 Feb 2020 12:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580906632; bh=0nhgLoKBd1xmo2Khpi4Cvrfth35BI8Ya1ztqYzurtSM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ICzBZX/JpwWLiHlmX/jL53ordUZGAjB3KgThNSGl7YnfS+Km/wWA9MXDeaLBS9Xta gGo1PV4ZFrDtjw6ClU4/t2BIFlGX7Wfm6ErX7tcYlvNUnnFNf5xj3BJOcCBAInbLY+ tAG0Jvn/abpxb0agK7YlmJQOt1cMwzaNZI+xBo8E= 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 1izK23-00386f-1b; Wed, 05 Feb 2020 12:43:51 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 05 Feb 2020 12:43:51 +0000 From: Marc Zyngier To: Zenghui Yu Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, tglx@linutronix.de, jason@lakedaemon.net, wanghaibin.wang@huawei.com Subject: Re: [PATCH 1/5] irqchip/gic-v4.1: Fix programming of GICR_VPROPBASER_4_1_SIZE In-Reply-To: <20200204090940.1225-2-yuzenghui@huawei.com> References: <20200204090940.1225-1-yuzenghui@huawei.com> <20200204090940.1225-2-yuzenghui@huawei.com> Message-ID: <29e6c483b71dcf28e9b140f4edfe566d@kernel.org> X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/1.3.8 X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, tglx@linutronix.de, jason@lakedaemon.net, wanghaibin.wang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-02-04 09:09, Zenghui Yu wrote: > The Size field of GICv4.1 VPROPBASER register indicates number of > pages minus one and together Page_Size and Size control the vPEID > width. Let's respect this requirement of the architecture. > > Signed-off-by: Zenghui Yu > --- > drivers/irqchip/irq-gic-v3-its.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-gic-v3-its.c > b/drivers/irqchip/irq-gic-v3-its.c > index e5a25d97f8db..992bc72cab6f 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -2531,7 +2531,7 @@ static int allocate_vpe_l1_table(void) > npg = 1; > } > > - val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, npg); > + val |= FIELD_PREP(GICR_VPROPBASER_4_1_SIZE, npg - 1); > > /* Right, that's the number of CPU pages we need for L1 */ > np = DIV_ROUND_UP(npg * psz, PAGE_SIZE); Indeed, nice catch. M. -- Jazz is not dead. It just smells funny...