Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp961079yba; Mon, 1 Apr 2019 22:29:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfNvZYE7XeEEp0DWAHfBt5/bJMikLwmLcgQNbM9/pViTygFzjWxyvQEbogZO0Bc/JzrJg4 X-Received: by 2002:a63:fc0b:: with SMTP id j11mr468181pgi.74.1554182963187; Mon, 01 Apr 2019 22:29:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554182963; cv=none; d=google.com; s=arc-20160816; b=rLfzgMpVjB8nLehGOt5aynxM/jsigYB3zc6AI5MymtQiXDmJTNnHMdd1RnwYoxjc2G R8XILCZ6xZmwBRk0YBNVkvc/b1h+Ro520+z1KO5twF+nlZqH9R6h3Lv7QOnszTTW1TjY 6BQX+S9BNhrkjkFN7lcnZG4RwapvgzvA7usMCe1HLaeD/auAGxE5d/l0IFNAfKrdbfyD Xb9uB/gFvvtLhlmRnpmO/EUGeF51NFPNS/bP139vLnOy4PDZYpn4Z4AqQU8wUqs1PX8m whN94pDgl/BigIE8UaBPkCEn5WD1P21fvDZ38LeoYvelHo7w9A4LbS473lmOY3uvpkN+ lybA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date; bh=y4MDzkVvF+rRBIRUq/MorprVfha+pa518KF7KrZC1Hw=; b=rGJo7mHxpUdBz4PosYxiXsClgHN5L4+t74WXl9KKqYB9KzvvNqeE48X7TahbIl/uoX u3nishSzbVZOR4ken2EVXwThz3BRPANU7f0qlPHiCWaBZx+m9jYA0BpsKUZ0wZN9iA6G 4y4Y4nNDCqi00TRvkw6wSTH3ebfh14s13t8dQsflo1da4lo3rasagyW3BvLHnbCQvzm5 ikBoHKG5AKGt57jNuFEMmdqL6MnKwLLeU3Xl+LJ6c1u9qowvA9spgOcBmT1+1X7bBJ8k omTz9Q2czgO+Ow60FMQXNVejgycFpF8IthBu3jVVnzrKI4Ro0ptYsnK0NvjvnCh7h0WJ T59g== 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 q13si10510837pfi.208.2019.04.01.22.29.07; Mon, 01 Apr 2019 22:29:23 -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 S1728567AbfDBFAu (ORCPT + 99 others); Tue, 2 Apr 2019 01:00:50 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:44688 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725778AbfDBFAt (ORCPT ); Tue, 2 Apr 2019 01:00:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1B21CA78; Mon, 1 Apr 2019 22:00:49 -0700 (PDT) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 34B013F59C; Mon, 1 Apr 2019 22:00:46 -0700 (PDT) Date: Tue, 02 Apr 2019 06:00:43 +0100 Message-ID: <86ef6l57d0.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Heyi Guo Cc: , Thomas Gleixner , Jason Cooper , wanghaibin 00208455 Subject: Re: MSI number limit for PCI hotplug under PCI bridge on ARM platform In-Reply-To: <327ba551-2cbd-08bb-d4c1-107c3ff7d45d@huawei.com> References: <327ba551-2cbd-08bb-d4c1-107c3ff7d45d@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, M. -- Jazz is not dead, it just smell funny.