On Tue, 5 Feb 2019 17:13:46 +1100 David Gibson <da...@gibson.dropbear.id.au> wrote:
> On Thu, Jan 17, 2019 at 06:14:46PM +0100, Greg Kurz wrote: > > The current code assumes that an interrupt is allocated as soon as its > > type is set to MSI or LSI. PHB hotplug will require to be able to set > > the type of an interrupt before actually allocating it. > > Hm.. why? > The justification for that is given in patch 6 actually: Every PHB needs to claim 4 LSIs to support legacy PCI devices. This is currently done at PHB realize. When using in-kernel XICS (or upcoming in-kernel XIVE), QEMU synchronizes the state of all irqs, including these LSIs, later on at machine reset. In order to support PHB hotplug, we need a way to tell KVM about the LSIs that doesn't require a machine reset. Since these irq numbers are fixed values derived from the PHB index, let's identify them all at machine init. Older machines that don't have fixed irq numbers cannot support PHB hotplug and keep the existing behavior. FYI, I'm currently reworking that part entirely. Maybe not worth wasting to much time on reviewing this v3.
pgpRq4wfVxHqs.pgp
Description: OpenPGP digital signature