summaryrefslogtreecommitdiffstats
path: root/hw/ppc/spapr_numa.c
diff options
context:
space:
mode:
authorDaniel Henrique Barboza2021-01-28 18:42:11 +0100
committerDavid Gibson2021-02-10 00:43:50 +0100
commit3b880445e61b6509a9a5b4236eaf07718ae4a51a (patch)
tree3f246cd47c20b1ed430924eb135691bc180f164d /hw/ppc/spapr_numa.c
parentppc/pnv: Introduce a LPC FW memory region attribute to map the PNOR (diff)
downloadqemu-3b880445e61b6509a9a5b4236eaf07718ae4a51a.tar.gz
qemu-3b880445e61b6509a9a5b4236eaf07718ae4a51a.tar.xz
qemu-3b880445e61b6509a9a5b4236eaf07718ae4a51a.zip
spapr: move spapr_machine_using_legacy_numa() to spapr_numa.c
This function is used only in spapr_numa.c. Tested-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20210128174213.1349181-2-danielhb413@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr_numa.c')
-rw-r--r--hw/ppc/spapr_numa.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/ppc/spapr_numa.c b/hw/ppc/spapr_numa.c
index b50796bbe3..261810525b 100644
--- a/hw/ppc/spapr_numa.c
+++ b/hw/ppc/spapr_numa.c
@@ -19,6 +19,15 @@
/* Moved from hw/ppc/spapr_pci_nvlink2.c */
#define SPAPR_GPU_NUMA_ID (cpu_to_be32(1))
+static bool spapr_machine_using_legacy_numa(SpaprMachineState *spapr)
+{
+ MachineState *machine = MACHINE(spapr);
+ SpaprMachineClass *smc = SPAPR_MACHINE_GET_CLASS(machine);
+
+ return smc->pre_5_2_numa_associativity ||
+ machine->numa_state->num_nodes <= 1;
+}
+
static bool spapr_numa_is_symmetrical(MachineState *ms)
{
int src, dst;