spapr: Correct inverted test in spapr_pc_dimm_node()
commitccc2cef8b3f1dedd059924eb8ec1a87eff8ef607
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 10 Jul 2018 01:40:52 +0000 (10 11:40 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 16 Jul 2018 01:18:09 +0000 (16 11:18 +1000)
tree9c52e31edeaa2b3999701052edfc3c7694893b90
parent593a1cdd66ac83c1cefdd4cc5dd6338006fc202c
spapr: Correct inverted test in spapr_pc_dimm_node()

This function was introduced between v2.11 and v2.12 to replace obsolete
ways of specifying the NUMA nodes for DIMMs.  It's used to find the correct
node for an LMB, by locating which DIMM object it lies within.

Unfortunately, one of the checks is inverted, so we check whether the
address is less than two different things, rather than actually checking
a range.  This introduced a regression, meaning that after a reboot qemu
will advertise incorrect node information for memory to the guest.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
hw/ppc/spapr.c