spapr/irq: Only claim VALID interrupts at the KVM level
commit4c3539d491026a0cc68e3b886f16cb7f57efd46b
authorCédric Le Goater <clg@kaod.org>
Wed, 11 Sep 2019 13:39:37 +0000 (11 15:39 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 Oct 2019 00:25:23 +0000 (4 10:25 +1000)
tree963d79521ceafe914aa8a57d74050359298f1495
parent4a99d40551d265e56584bfa6657d9a549e729127
spapr/irq: Only claim VALID interrupts at the KVM level

A typical pseries VM with 16 vCPUs, one disk, one network adapater
uses less than 100 interrupts but the whole IRQ number space of the
QEMU machine is allocated at reset time and it is 8K wide. This is
wasting a considerable amount of interrupt numbers in the global IRQ
space which has 1M interrupts per socket on a POWER9.

To optimise the HW resources, only request at the KVM level interrupts
which have been claimed by the guest. This will help to increase the
maximum number of VMs per system and also help supporting nested guests
using the XIVE interrupt mode.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20190911133937.2716-3-clg@kaod.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <156942766014.1274533.10792048853177121231.stgit@bahia.lan>
[dwg: Folded in fix up from Greg Kurz]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/spapr_xive_kvm.c
hw/intc/xics_kvm.c