summaryrefslogtreecommitdiffstats
path: root/include/hw/ppc/spapr_irq.h
diff options
context:
space:
mode:
authorGreg Kurz2019-11-26 17:46:23 +0100
committerDavid Gibson2019-12-17 00:39:48 +0100
commit4ffb7496881ec361deaf1f51c41a933bde3cbf7b (patch)
tree0a864924b890d68b53f2da1c72938fd0ed7cc374 /include/hw/ppc/spapr_irq.h
parentlinux-headers: Update (diff)
downloadqemu-4ffb7496881ec361deaf1f51c41a933bde3cbf7b.tar.gz
qemu-4ffb7496881ec361deaf1f51c41a933bde3cbf7b.tar.xz
qemu-4ffb7496881ec361deaf1f51c41a933bde3cbf7b.zip
spapr: Pass the maximum number of vCPUs to the KVM interrupt controller
The XIVE and XICS-on-XIVE KVM devices on POWER9 hosts can greatly reduce their consumption of some scarce HW resources, namely Virtual Presenter identifiers, if they know the maximum number of vCPUs that may run in the VM. Prepare ground for this by passing the value down to xics_kvm_connect() and kvmppc_xive_connect(). This is purely mechanical, no functional change. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <157478678301.67101.2717368060417156338.stgit@bahia.tlslab.ibm.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/spapr_irq.h')
-rw-r--r--include/hw/ppc/spapr_irq.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h
index ff814d13de..ca8cb44213 100644
--- a/include/hw/ppc/spapr_irq.h
+++ b/include/hw/ppc/spapr_irq.h
@@ -43,7 +43,8 @@ typedef struct SpaprInterruptController SpaprInterruptController;
typedef struct SpaprInterruptControllerClass {
InterfaceClass parent;
- int (*activate)(SpaprInterruptController *intc, Error **errp);
+ int (*activate)(SpaprInterruptController *intc, uint32_t nr_servers,
+ Error **errp);
void (*deactivate)(SpaprInterruptController *intc);
/*
@@ -98,8 +99,13 @@ qemu_irq spapr_qirq(SpaprMachineState *spapr, int irq);
int spapr_irq_post_load(SpaprMachineState *spapr, int version_id);
void spapr_irq_reset(SpaprMachineState *spapr, Error **errp);
int spapr_irq_get_phandle(SpaprMachineState *spapr, void *fdt, Error **errp);
-int spapr_irq_init_kvm(int (*fn)(SpaprInterruptController *, Error **),
+
+typedef int (*SpaprInterruptControllerInitKvm)(SpaprInterruptController *,
+ uint32_t, Error **);
+
+int spapr_irq_init_kvm(SpaprInterruptControllerInitKvm fn,
SpaprInterruptController *intc,
+ uint32_t nr_servers,
Error **errp);
/*