qemu-e2k/hw/ppc
Michael Roth 4bcfa56ca9 spapr_pci: advertise explicit numa IDs even when there's 1 node
With the addition of "numa_node" properties for PHBs we began
advertising NUMA affinity in cases where nb_numa_nodes > 1.

Since the default on the guest side is to make no assumptions about
PHB NUMA affinity (defaulting to -1), there is still a valid use-case
for explicitly defining a PHB's NUMA affinity even when there's just
one node. In particular, some workloads make faulty assumptions about
/sys/bus/pci/<devid>/numa_node being >= 0, warranting the use of
this property as a workaround even if there's just 1 PHB or NUMA
node.

Enable this use-case by always advertising the PHB's NUMA affinity
if "numa_node" has been explicitly set.

We could achieve this by relaxing the check to simply be
nb_numa_nodes > 0, but even safer would be to check
numa_info[nodeid].present explicitly, and to fail at start time
for cases where it does not exist.

This has an additional affect of no longer advertising PHB NUMA
affinity unconditionally if nb_numa_nodes > 1 and "numa_node"
property is unset/-1, but since the default value on the guest
side for each PHB is also -1, the behavior should be the same for
that situation. We could still retain the old behavior if desired,
but the decision seems arbitrary, so we take the simpler route.

Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Shivaprasad G. Bhat <shivapbh@in.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-28 09:36:58 +11:00
..
Makefile.objs hw/ppc: add a ppc_create_page_sizes_prop() helper routine 2016-09-07 12:40:12 +10:00
e500-ccsr.h ppc: do not use ../ in include files 2013-03-01 13:57:33 +01:00
e500.c sysbus: Remove ignored return value of FindSysbusDeviceFunc 2016-09-27 17:03:34 -03:00
e500.h target-ppc: Eliminate redundant and incorrect function booke206_page_size_to_tlb 2016-07-01 09:57:01 +10:00
e500plat.c dma: do not depend on kvm_enabled() 2016-05-19 16:42:28 +02:00
fdt.c hw/ppc: add a ppc_create_page_sizes_prop() helper routine 2016-09-07 12:40:12 +10:00
mac.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
mac_newworld.c hw/ppc: realize the PCI root bus as part of mac99 init 2016-07-04 14:50:01 +03:00
mac_oldworld.c vl: Eliminate usb_enabled() 2016-06-13 13:24:41 +02:00
mpc8544_guts.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
mpc8544ds.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc.c ppc: parse cpu features once 2016-08-13 17:32:58 +10:00
ppc4xx_devs.c qemu-common: push cpu.h inclusion out of qemu-common.h 2016-05-19 16:42:29 +02:00
ppc4xx_pci.c ppc: Clean up includes 2016-01-29 15:07:22 +00:00
ppc405.h Remove unused function declarations 2016-09-15 15:32:22 +03:00
ppc405_boards.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
ppc405_uc.c Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND 2016-03-22 22:20:17 +01:00
ppc440_bamboo.c loader: Add data swap option to load-elf 2016-03-04 11:30:21 +00:00
ppc_booke.c Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND 2016-03-22 22:20:17 +01:00
ppce500_spin.c cpus: pass CPUState to run_on_cpu helpers 2016-09-27 11:57:29 +02:00
prep.c vl: Eliminate usb_enabled() 2016-06-13 13:24:41 +02:00
spapr.c Increase MAX_CPUMASK_BITS from 255 to 288 2016-10-24 17:29:15 -02:00
spapr_cpu_core.c numa: reduce code duplication by adding helper numa_get_node_for_cpu() 2016-10-10 01:16:57 +03:00
spapr_drc.c spapr_drc: convert to trace framework instead of DPRINTF 2016-09-23 10:29:40 +10:00
spapr_events.c ppc/xics: Make the ICSState a list 2016-10-14 16:31:02 +11:00
spapr_hcall.c cpus: pass CPUState to run_on_cpu helpers 2016-09-27 11:57:29 +02:00
spapr_iommu.c memory: introduce IOMMUOps.notify_flag_changed 2016-09-27 09:00:04 +02:00
spapr_pci.c spapr_pci: advertise explicit numa IDs even when there's 1 node 2016-10-28 09:36:58 +11:00
spapr_pci_vfio.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
spapr_rng.c hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
spapr_rtas.c ppc patch queue 2016-09-23 2016-09-23 14:26:12 +01:00
spapr_rtas_ddw.c spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW) 2016-07-05 14:31:08 +10:00
spapr_rtc.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
spapr_vio.c ppc/xics: Make the ICSState a list 2016-10-14 16:31:02 +11:00
trace-events spapr_vio: convert to trace framework instead of DPRINTF 2016-09-23 10:29:40 +10:00
virtex_ml507.c qemu-common: push cpu.h inclusion out of qemu-common.h 2016-05-19 16:42:29 +02:00