Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1118827yba; Tue, 2 Apr 2019 02:41:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcPjLwKQr8Vy/zqEGW4AlDErib6+swZYOksR58bQSb2nI7otr2tW/v0fN9KXJ4TjnLluUN X-Received: by 2002:a62:8381:: with SMTP id h123mr14641938pfe.226.1554198102647; Tue, 02 Apr 2019 02:41:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554198102; cv=none; d=google.com; s=arc-20160816; b=Utu5bf9FMItQ+8scErY5OO5Yj7U1ZcHOBqi6XSxfB6vVZmBodT6aka9zA2h9pTrC2y TX7KyEu7VhB5A+uQ7A2x+t94FutLbFMLow/uw5GUHEJ439aIm02PBmu7RTva7DZc50cL KwrLzsIzJ2QzTo7P7h+eh/jdwSuphw7un8SQv8JTwXy8jx1Wv5mYysWgiZFj8bzGVBsa 1C9PGbTYVlPAaCvBzLiv5TxPpAuG66ge5IZGXC0WEalBb3feG7dK7GcLLdF8V+EMNNIn WSlrxxFzp9Y/vSXp1VSXteYeJAXHvaqpOba8ZQLl7RqhzZxQZ2JFyd8g3BZti5rOl8su J/ZQ== 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:cc:references:to :subject; bh=0mgc2eLJfT5jGevGBurMzoM7Kw7WPLAYoxY+wLiaA8Y=; b=WnbZGOVDuOq3RiLVhIVfTTGx4KAAEF9GETr13og8HJjJRbFQTkTU3pUyjhM1G+V1l9 46FTwgqaTC222wUsXvqYO/8nnw0Lf2G0cpLdSRP/Los2tTMWHGVYjeKvJ2EwBb6ouvVw 5s42y9cfrEA0aeDFhqM/zwSq6m94yov4weIsf/u2t3wQbqXD7FNOYK6438q2R9E/YHhM dK/wSTJ0HO4HQtKWWoHxUFJebK4HmkiSykkYksQrPPY7eSzajKtfXF7ob8vFRMJCmMz7 NGfyEtKN5f80q73hU6oG3u61bDSuFwx8tLRbwQ8C0JjY3/joVhIp5gq24+nKv/5qQvGB zhfw== 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 q81si11423575pfc.126.2019.04.02.02.41.27; Tue, 02 Apr 2019 02:41:42 -0700 (PDT) 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 S1730116AbfDBJav (ORCPT + 99 others); Tue, 2 Apr 2019 05:30:51 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5651 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726284AbfDBJav (ORCPT ); Tue, 2 Apr 2019 05:30:51 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [10.3.19.208]) by Forcepoint Email with ESMTP id 8184764F2A690FF38AF8; Tue, 2 Apr 2019 17:30:47 +0800 (CST) Received: from [127.0.0.1] (10.177.31.55) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.408.0; Tue, 2 Apr 2019 17:30:36 +0800 Subject: Re: MSI number limit for PCI hotplug under PCI bridge on ARM platform To: Marc Zyngier References: <327ba551-2cbd-08bb-d4c1-107c3ff7d45d@huawei.com> <86ef6l57d0.wl-marc.zyngier@arm.com> CC: , Thomas Gleixner , Jason Cooper , wanghaibin 00208455 From: Heyi Guo Message-ID: Date: Tue, 2 Apr 2019 17:30:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <86ef6l57d0.wl-marc.zyngier@arm.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.31.55] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/4/2 13:00, Marc Zyngier wrote: > On Mon, 01 Apr 2019 14:55:52 +0100, > Heyi Guo wrote: >> Hi folks, >> >> In current kernel implementation for ARM platform, all devices under >> one PCI bridge share a same device ID and the total number of MSI >> interrupts is fixed at the first time any child device is allocating >> MSI. However, this may cause failure of allocating MSI if the system >> supports device hot-plug under the PCI bridge, which is possible for >> ARM virtual machine with generic pcie-to-pci-bridge and kernel >> config HOTPLUG_PCI_SHPC enabled. >> >> Does it make sense to add support for the above scenario? If it >> does, any suggestion for how to do that? > I don't think it makes much sense. You have the flexibility not to add > such a broken setup to your guests, and instead have enough pcie ports > so that you can always have an exact allocation and no DevID aliasing. > > The alternative is to dynamically grow the ITT for a given DevID, > which cannot be done without unmapping it first. This in turn will > result in interrupts being lost while the DevID was unmapped, and > they'd need to be pessimistically reinjected. This also involves a > substantial amount of data structure repainting, as you're pretty much > guaranteed not to be able to reuse the same LPI range. > > Given that this is arbitrarily self-inflicted, I'm not overly keen on > even trying to support this. SHPC hot plug under PCI-bridge for virtual machine is attracting us for its larger capacity, i.e. one bridge can have up to hot-plugable 31 devices, while each PCIe root port or downstream port can only have one. Anyway, the reason for not supporting this also makes sense to me. Thanks for your advice, Heyi > > Thanks, > > M. >