Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1917002ybv; Sun, 23 Feb 2020 18:23:21 -0800 (PST) X-Google-Smtp-Source: APXvYqzLCHb35AIkP/t31JwsAbXZpWs6WPz0+660WC/i/eAEncF3oXIE4Zq1ZL9tcv9UtZYRhCck X-Received: by 2002:a05:6830:1608:: with SMTP id g8mr36502183otr.169.1582511000926; Sun, 23 Feb 2020 18:23:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582511000; cv=none; d=google.com; s=arc-20160816; b=K1E0f+KqJqj9fhWPUoOQ/MccTlrbAQoma6jEezm3g0ewyOn6cpYgFQSdZTuzicMYOC tSWdafIhuzRIVpjopNKMTLFVxq6PxwvdSygXoTqo9baHfRKdWdUSd607xeq36Eqt6IiD aFkuXSXdVOKmToyloSDDfEbV09WUEEXAHySn9GsNgYabK3XKRAISXPFlwYOFehCuyDF3 pc9JQXNHpVO+CJLCoCS0ZZXjU5MmxNiFxOnuJuFNirYDXddj+0ff1l4SwC8l9oroj7ag sbraCdFimTBDMhe4IfNTWeiSHLrefOBjh8gcCDkqibkBjpPXxpqs53kZzGlKQSvfzzH1 EmqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=6j/MYrcU0D64r8KCJcgGclVGMUOoNnazu1+s+//VqvA=; b=b6SHjF2lPKNIe+poY4wkDT+7J6SuE8xqW3oeyl8bdJabAMxpNsfRiOsHRKudsNR6UA TJdHeCrzZ4n9eWfykeiET+Ic9/QwxjRMqaWdPafSSZuOjtVg9EyeCAstcsQRbh4TD/Ld 5GswNs6iZQ6thDbzN4fL18ys0fabWHlg9hhSyt+/br9dV6PHAdC4WQOfYuDjFveaPi4L UO5Iwh6mmncE4Ez2B+6HhXeD6b9nzPaFc6FVbAddp/vTeQnEE5ZOJiubMdoW4VB/PRYa GOm+fPpfMOrLybtj9Wd6OxMGtnZ3Bm/wh6yVXldseQ0oqWInds5EGUAL8kKL0hdPO7QO MjhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si4629020oia.232.2020.02.23.18.23.08; Sun, 23 Feb 2020 18:23:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727252AbgBXCW7 (ORCPT + 99 others); Sun, 23 Feb 2020 21:22:59 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:11101 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727223AbgBXCW7 (ORCPT ); Sun, 23 Feb 2020 21:22:59 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 4F1811C461BE87A593FA; Mon, 24 Feb 2020 10:22:54 +0800 (CST) Received: from [127.0.0.1] (10.173.221.228) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Mon, 24 Feb 2020 10:22:45 +0800 Subject: Re: [PATCH] irq/gic-its: gicv4: set VPENDING table as inner-shareable To: Marc Zyngier CC: , , "Thomas Gleixner" , Jason Cooper References: <20191130073849.38378-1-guoheyi@huawei.com> <20191201180434.1dba3116@why> From: Heyi Guo Message-ID: <3de7a72f-1a15-c908-57e6-35eff00b1ca6@huawei.com> Date: Mon, 24 Feb 2020 10:22:44 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20191201180434.1dba3116@why> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.221.228] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, On 2019/12/2 2:04, Marc Zyngier wrote: > On Sat, 30 Nov 2019 15:38:49 +0800 > Heyi Guo wrote: > >> There is no special reason to set virtual LPI pending table as >> non-shareable. If we choose to hard code the shareability without >> probing, inner-shareable will be a better choice, for all the other >> ITS/GICR tables prefer to be inner-shareable. > One of the issues is that we have strictly no idea what the caches are > Inner Shareable with (I've been asking for such clarification for years > without getting anywhere). You can have as many disconnected inner > shareable domains as you want! > > I suspect that in the grand scheme of things, the redistributors > ought to be in the same inner shareable domain, and that with a bit of > luck, the CPUs are there as well. Still, that's a massive guess. > >> What's more, on Hisilicon hip08 it will trigger some kind of bus >> warning when mixing use of different shareabilities. > Do you have more information about what the bus is complaining about? > Is that because the CPUs have these pages mapped as inner shareable? > > I'll give it a go on D05 (HIP07) to find out what changes there. How's your go on D05? Did you see any issues? Thanks, Heyi > > Thanks, > > M. > >> Signed-off-by: Heyi Guo >> Cc: Thomas Gleixner >> Cc: Jason Cooper >> Cc: Marc Zyngier >> --- >> drivers/irqchip/irq-gic-v3-its.c | 2 +- >> include/linux/irqchip/arm-gic-v3.h | 3 +++ >> 2 files changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c >> index 787e8eec9a7f..d31e863bc9ef 100644 >> --- a/drivers/irqchip/irq-gic-v3-its.c >> +++ b/drivers/irqchip/irq-gic-v3-its.c >> @@ -2831,7 +2831,7 @@ static void its_vpe_schedule(struct its_vpe *vpe) >> val = virt_to_phys(page_address(vpe->vpt_page)) & >> GENMASK_ULL(51, 16); >> val |= GICR_VPENDBASER_RaWaWb; >> - val |= GICR_VPENDBASER_NonShareable; >> + val |= GICR_VPENDBASER_InnerShareable; >> /* >> * There is no good way of finding out if the pending table is >> * empty as we can race against the doorbell interrupt very >> diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h >> index 5cc10cf7cb3e..a184f875e451 100644 >> --- a/include/linux/irqchip/arm-gic-v3.h >> +++ b/include/linux/irqchip/arm-gic-v3.h >> @@ -289,6 +289,9 @@ >> #define GICR_VPENDBASER_NonShareable \ >> GIC_BASER_SHAREABILITY(GICR_VPENDBASER, NonShareable) >> >> +#define GICR_VPENDBASER_InnerShareable \ >> + GIC_BASER_SHAREABILITY(GICR_VPENDBASER, InnerShareable) >> + >> #define GICR_VPENDBASER_nCnB GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, nCnB) >> #define GICR_VPENDBASER_nC GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, nC) >> #define GICR_VPENDBASER_RaWt GIC_BASER_CACHEABILITY(GICR_VPENDBASER, INNER, RaWt) > >