[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/22] spapr: ensure we have at least one XICS serve
From: |
David Gibson |
Subject: |
[Qemu-devel] [PATCH 01/22] spapr: ensure we have at least one XICS server |
Date: |
Wed, 24 Jun 2015 16:30:15 +1000 |
From: Greg Kurz <address@hidden>
XICS needs to know the upper value for cpu_index as it is used to compute
the number of servers:
smp_cpus * kvmppc_smt_threads() / smp_threads
When passing -smp cpus=1,threads=9 on a POWER8 host, we end up with:
1 * 8 / 9 = 0
... which leads to an assertion in both emulated:
Number of servers needs to be greater 0
Aborted (core dumped)
... and in-kernel XICS:
xics_kvm_realize: Assertion `icp->nr_servers' failed.
Aborted (core dumped)
With this patch, we are sure that nr_servers > 0. Passing the same bogus
-smp option then leads to:
qemu-system-ppc64: Cannot support more than 8 threads on PPC with KVM
... which is a lot more explicit than the XICS errors.
Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index f174e5a..10ca866 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1467,7 +1467,8 @@ static void ppc_spapr_init(MachineState *machine)
/* Set up Interrupt Controller before we create the VCPUs */
spapr->icp = xics_system_init(machine,
- smp_cpus * kvmppc_smt_threads() /
smp_threads,
+ DIV_ROUND_UP(smp_cpus * kvmppc_smt_threads(),
+ smp_threads),
XICS_IRQS);
/* init CPUs */
--
2.4.3
- [Qemu-devel] [PATCH 07/22] spapr_pci: encode missing 64-bit memory address space, (continued)
- [Qemu-devel] [PATCH 07/22] spapr_pci: encode missing 64-bit memory address space, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 09/22] spapr_pci: set device node unit address as hex, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 14/22] spapr: Support ibm, lrdr-capacity device tree property, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 12/22] Revert "hw/ppc/spapr_pci.c: Avoid functions not in glib 2.12 (g_hash_table_iter_*)", David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 13/22] spapr: Consider max_cpus during xics initialization, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 05/22] spapr: Remove obsolete entry_point field from sPAPRMachineState, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 04/22] spapr: Remove obsolete ram_limit field from sPAPRMachineState, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 08/22] spapr_pci: encode class code including Prog IF register, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 03/22] spapr: Merge sPAPREnvironment into sPAPRMachineState, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 02/22] pseries: Update SLOF firmware image to qemu-slof-20150429, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 01/22] spapr: ensure we have at least one XICS server,
David Gibson <=
- [Qemu-devel] [PATCH 15/22] cpus: Add a macro to walk CPUs in reverse, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 17/22] spapr: Consolidate cpu init code into a routine, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 18/22] ppc: Update cpu_model in MachineState, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 22/22] spapr_pci: drop redundant args in spapr_[populate, create]_pci_child_dt, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 19/22] xics_kvm: Don't enable KVM_CAP_IRQ_XICS if already enabled, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 21/22] spapr_pci: populate ibm,loc-code, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 20/22] spapr_pci: enumerate and add PCI device tree, David Gibson, 2015/06/24
- [Qemu-devel] [PATCH 16/22] spapr: Reorganize CPU dt generation code, David Gibson, 2015/06/24
- Re: [Qemu-devel] [PATCH 00/22] sPAPR updates 2015-06-24, David Gibson, 2015/06/24