pseries: do not allow memory-less/cpu-less NUMA node
commit58c46efa451caa3935224223f950216872e2eee3
authorLaurent Vivier <lvivier@redhat.com>
Fri, 30 Aug 2019 16:13:45 +0000 (30 18:13 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 4 Oct 2019 00:25:23 +0000 (4 10:25 +1000)
tree13849317b3929b5be45efcc6c7091bedb9b1858d
parent4f59102571fce49af180cfc6d4cdd2b5df7bdb14
pseries: do not allow memory-less/cpu-less NUMA node

When we hotplug a CPU on memory-less/cpu-less node, the linux kernel
crashes.

This happens because linux kernel needs to know the NUMA topology at
start to be able to initialize the distance lookup table.

On pseries, the topology is provided by the firmware via the existing
CPUs and memory information. Thus a node without memory and CPU cannot be
discovered by the kernel.

To avoid the kernel crash, do not allow to start pseries with empty
nodes.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20190830161345.22436-1-lvivier@redhat.com>
[dwg: Rework to cope with movement of numa state from globals to MachineState]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c