spapr: move FORM1 verifications to post CAS
commit5dab5abe623d97929382158b43b3fd545e8edd62
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 20 Sep 2021 17:49:45 +0000 (20 14:49 -0300)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 30 Sep 2021 02:26:06 +0000 (30 12:26 +1000)
tree8dce7386e9233cfd719cad0b313f68116ab034dd
parenta165ac67c3ff8dc7065aa827de36da3785ec83fd
spapr: move FORM1 verifications to post CAS

FORM2 NUMA affinity is prepared to deal with empty (memory/cpu less)
NUMA nodes. This is used by the DAX KMEM driver to locate a PAPR SCM
device that has a different latency than the original NUMA node from the
regular memory. FORM2 is also able  to deal with asymmetric NUMA
distances gracefully, something that our FORM1 implementation doesn't
do.

Move these FORM1 verifications to a new function and wait until after
CAS, when we're sure that we're sticking with FORM1, to enforce them.

Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20210920174947.556324-6-danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
hw/ppc/spapr_hcall.c
hw/ppc/spapr_numa.c
include/hw/ppc/spapr_numa.h