mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
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>
This commit is contained in:
parent
2a886794f1
commit
4ffb749688
8 changed files with 28 additions and 13 deletions
|
@ -422,10 +422,11 @@ static int xics_spapr_post_load(SpaprInterruptController *intc, int version_id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int xics_spapr_activate(SpaprInterruptController *intc, Error **errp)
|
||||
static int xics_spapr_activate(SpaprInterruptController *intc,
|
||||
uint32_t nr_servers, Error **errp)
|
||||
{
|
||||
if (kvm_enabled()) {
|
||||
return spapr_irq_init_kvm(xics_kvm_connect, intc, errp);
|
||||
return spapr_irq_init_kvm(xics_kvm_connect, intc, nr_servers, errp);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue