linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Heyi Guo <guoheyi@huawei.com>
Cc: <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	wanghaibin 00208455 <wanghaibin.wang@huawei.com>
Subject: Re: MSI number limit for PCI hotplug under PCI bridge on ARM platform
Date: Tue, 02 Apr 2019 06:00:43 +0100	[thread overview]
Message-ID: <86ef6l57d0.wl-marc.zyngier@arm.com> (raw)
In-Reply-To: <327ba551-2cbd-08bb-d4c1-107c3ff7d45d@huawei.com>

On Mon, 01 Apr 2019 14:55:52 +0100,
Heyi Guo <guoheyi@huawei.com> 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.

  reply	other threads:[~2019-04-02  5:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 13:55 MSI number limit for PCI hotplug under PCI bridge on ARM platform Heyi Guo
2019-04-02  5:00 ` Marc Zyngier [this message]
2019-04-02  9:30   ` Heyi Guo
2019-04-02 10:07     ` Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ef6l57d0.wl-marc.zyngier@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=guoheyi@huawei.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wanghaibin.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).