diff options
author | Tao Xu <tao3.xu@intel.com> | 2019-08-09 14:57:23 +0800 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2019-09-03 11:26:55 -0300 |
commit | 118154b7674b85827f272332efe86fc58cb76249 (patch) | |
tree | 5bdab4b850c1ebca8b88c8bab9673230146c9b83 /hw/core | |
parent | aa57020774b690a22be72453b8e91c9b5a68c516 (diff) |
numa: move numa global variable have_numa_distance into MachineState
Move existing numa global have_numa_distance into NumaState.
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Liu Jingqi <jingqi.liu@intel.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-4-tao3.xu@intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/core')
-rw-r--r-- | hw/core/numa.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/core/numa.c b/hw/core/numa.c index 2712c78adb..4a7adc9b98 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -55,7 +55,6 @@ static int have_mem; static int max_numa_nodeid; /* Highest specified NUMA node ID, plus one. * For all nodes, nodeid < max_numa_nodeid */ -bool have_numa_distance; NodeInfo numa_info[MAX_NODES]; @@ -173,7 +172,7 @@ void parse_numa_distance(MachineState *ms, NumaDistOptions *dist, Error **errp) } numa_info[src].distance[dst] = val; - have_numa_distance = true; + ms->numa_state->have_numa_distance = true; } void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp) @@ -446,7 +445,7 @@ void numa_complete_configuration(MachineState *ms) * asymmetric. In this case, the distances for both directions * of all node pairs are required. */ - if (have_numa_distance) { + if (ms->numa_state->have_numa_distance) { /* Validate enough NUMA distance information was provided. */ validate_numa_distance(ms); |