Hi, This series implements a new approach to the NUMA code in the spapr machine. We're now able to make an attempt to try to take user input in consideration, instead of ignoring any user input regarding NUMA distance.
This series was rebased upon David's ppc-for-5.2 tree. More information about what are being done here can be found in the specs/ppc-spapr-numa.rst file (only available in David's branch ATM). This is also available in [1]. First patch is the patch from Cornelia that added the 5.2 machine type. I included it here because I built upon it for compatibility code. Second patch adds a flag to hw/core/numa.c to forbid assymetrical topologies for the spapr machine, since we do not support that. All other patches are focused on cleanups/code juggling and the actual implementation inside the ppc/spapr files. With this patch, we're now able to at least attempt to honor user input. Patch 10 has examples of how the code is working and what is to expect and, most important, what to not expect. NOTE: for anyone willing to test this series, be warned that there is a bug in the Linux kernel, causing any associativity information for the node 0 to be discarded. A patch was sent in [2] to try to fix that. [1] https://github.com/danielhb/qemu/tree/spapr_numa_v1 [2] https://lore.kernel.org/linuxppc-dev/20200814203413.542050-1-danielhb...@gmail.com/T/#m5c85daff828d8c8156781f9f957ad04903e93151 Cornelia Huck (1): hw: add compat machines for 5.2 Daniel Henrique Barboza (9): numa: introduce MachineClass::forbid_asymmetrical_numa spapr: robustify NVLink2 NUMA node logic spapr: add spapr_machine_using_legacy_numa() helper spapr: make ibm,max-associativity-domains scale with user input spapr: allow 4 NUMA levels in ibm,associativity-reference-points spapr: create helper to set ibm,associativity spapr: introduce SpaprMachineClass::numa_assoc_domains spapr: consider user input when defining spapr guest NUMA specs/ppc-spapr-numa: update with new NUMA support docs/specs/ppc-spapr-numa.rst | 213 ++++++++++++++++++++++++++++++ hw/arm/virt.c | 9 +- hw/core/machine.c | 3 + hw/core/numa.c | 7 + hw/i386/pc.c | 3 + hw/i386/pc_piix.c | 14 +- hw/i386/pc_q35.c | 13 +- hw/ppc/spapr.c | 239 +++++++++++++++++++++++++++++----- hw/ppc/spapr_hcall.c | 13 +- hw/ppc/spapr_nvdimm.c | 19 ++- hw/ppc/spapr_pci.c | 42 +++++- hw/ppc/spapr_pci_nvlink2.c | 10 +- hw/s390x/s390-virtio-ccw.c | 14 +- include/hw/boards.h | 4 + include/hw/i386/pc.h | 3 + include/hw/pci-host/spapr.h | 2 + include/hw/ppc/spapr.h | 12 +- include/hw/ppc/spapr_nvdimm.h | 5 +- 18 files changed, 568 insertions(+), 57 deletions(-) -- 2.26.2