summaryrefslogtreecommitdiffstats
path: root/hw/mem
diff options
context:
space:
mode:
authorTao Xu2019-08-09 08:57:22 +0200
committerEduardo Habkost2019-09-03 16:26:55 +0200
commitaa57020774b690a22be72453b8e91c9b5a68c516 (patch)
tree144a939fcca5737815d9134a45c44993ae36acce /hw/mem
parenthw/arm: simplify arm_load_dtb (diff)
downloadqemu-aa57020774b690a22be72453b8e91c9b5a68c516.tar.gz
qemu-aa57020774b690a22be72453b8e91c9b5a68c516.tar.xz
qemu-aa57020774b690a22be72453b8e91c9b5a68c516.zip
numa: move numa global variable nb_numa_nodes into MachineState
Add struct NumaState in MachineState and move existing numa global nb_numa_nodes(renamed as "num_nodes") into NumaState. And add variable numa_support into MachineClass to decide which submachines support NUMA. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Suggested-by: Igor Mammedov <imammedo@redhat.com> Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Tao Xu <tao3.xu@intel.com> Message-Id: <20190809065731.9097-3-tao3.xu@intel.com> [ehabkost: include hw/boards.h again to fix build failures] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/mem')
-rw-r--r--hw/mem/pc-dimm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 7c324a1329..99e2faf01b 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -172,6 +172,8 @@ static void pc_dimm_realize(DeviceState *dev, Error **errp)
{
PCDIMMDevice *dimm = PC_DIMM(dev);
PCDIMMDeviceClass *ddc = PC_DIMM_GET_CLASS(dimm);
+ MachineState *ms = MACHINE(qdev_get_machine());
+ int nb_numa_nodes = ms->numa_state->num_nodes;
if (!dimm->hostmem) {
error_setg(errp, "'" PC_DIMM_MEMDEV_PROP "' property is not set");