summaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-05-30 18:23:56 +0200
committerEduardo Habkost <ehabkost@redhat.com>2017-06-05 14:59:08 -0300
commita0ceb640d083ab583d115fbd2ded14c089044ae8 (patch)
treeddaa37a3b8e7b2f0b9c325b2e996577f62bfe4e9 /hw/i386
parent1f43571604da85c62f25f3ba6d275b1b5ea76ca2 (diff)
numa: consolidate cpu_preplug fixups/checks for pc/arm/spapr
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <1496161442-96665-2-git-send-email-imammedo@redhat.com> [ehabkost: Fix indentation] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/pc.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 107a34125b..5b07be61cf 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1893,7 +1893,6 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
int idx;
- int node_id;
CPUState *cs;
CPUArchId *cpu_slot;
X86CPUTopoInfo topo;
@@ -1984,21 +1983,7 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev,
cs = CPU(cpu);
cs->cpu_index = idx;
- node_id = cpu_slot->props.node_id;
- if (!cpu_slot->props.has_node_id) {
- /* by default CPUState::numa_node was 0 if it's not set via CLI
- * keep it this way for now but in future we probably should
- * refuse to start up with incomplete numa mapping */
- node_id = 0;
- }
- if (cs->numa_node == CPU_UNSET_NUMA_NODE_ID) {
- cs->numa_node = node_id;
- } else if (cs->numa_node != node_id) {
- error_setg(errp, "node-id %d must match numa node specified"
- "with -numa option for cpu-index %d",
- cs->numa_node, cs->cpu_index);
- return;
- }
+ numa_cpu_pre_plug(cpu_slot, dev, errp);
}
static void pc_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev,