[Qemu-devel] [PATCH v3 0/3] numa: move numa global variables into MachineState

Tao Xu posted 3 patches 5 years ago
Test checkpatch passed
Test asan passed
Test docker-clang@ubuntu passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190423074428.23031-1-tao3.xu@intel.com
Maintainers: Igor Mammedov <imammedo@redhat.com>, Markus Armbruster <armbru@redhat.com>, Richard Henderson <rth@twiddle.net>, Peter Maydell <peter.maydell@linaro.org>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Shannon Zhao <shannon.zhaosl@gmail.com>, Eduardo Habkost <ehabkost@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, "Michael S. Tsirkin" <mst@redhat.com>
exec.c                              |  5 +-
hw/acpi/aml-build.c                 |  9 ++--
hw/arm/boot.c                       |  4 +-
hw/arm/virt-acpi-build.c            | 17 ++++---
hw/arm/virt.c                       |  8 +++-
hw/core/machine.c                   | 21 ++++++--
hw/i386/acpi-build.c                |  4 +-
hw/i386/pc.c                        | 11 +++--
hw/mem/pc-dimm.c                    |  2 +
hw/pci-bridge/pci_expander_bridge.c |  2 +
hw/ppc/spapr.c                      | 25 ++++++++--
hw/ppc/spapr_pci.c                  |  2 +
include/hw/acpi/aml-build.h         |  2 +-
include/hw/boards.h                 | 22 +++++++++
include/sysemu/numa.h               | 13 +----
monitor.c                           |  4 +-
numa.c                              | 74 +++++++++++++++++------------
17 files changed, 155 insertions(+), 70 deletions(-)
[Qemu-devel] [PATCH v3 0/3] numa: move numa global variables into MachineState
Posted by Tao Xu 5 years ago
The aim of this patch is to add struct NumaState in MachineState
and move existing numa global nb_numa_nodes into NumaState.
And add variable numa_support into MachineClass to decide which
submachines support NUMA.

---
Changes in v3 -> v2:
    - rename the "NumaState::nb_numa_nodes" as "NumaState::num_nodes",
    and rename the "NumaState::numa_info" as "NumaState::nodes" (Eduardo)
    - use machine_num_numa_nodes(MachineState *ms) to check if
    ms->numa_state is NULL before using NumaState::num_nodes (Eduardo)
    - check if ms->numa_state == NULL in the set_numa_options to avoid
    using -numa in a machine-type which don't support numa

Changes in v2:
    - fix the mistake in numa_complete_configuration in numa.c
    - add MachineState into some functions to avoid using
    qdev_get_machine
    - add some if experssion to avoid the NumaState is null

Tao Xu (3):
  numa: move numa global variable nb_numa_nodes into MachineState
  numa: move numa global variable have_numa_distance into MachineState
  numa: move numa global variable numa_info into MachineState

 exec.c                              |  5 +-
 hw/acpi/aml-build.c                 |  9 ++--
 hw/arm/boot.c                       |  4 +-
 hw/arm/virt-acpi-build.c            | 17 ++++---
 hw/arm/virt.c                       |  8 +++-
 hw/core/machine.c                   | 21 ++++++--
 hw/i386/acpi-build.c                |  4 +-
 hw/i386/pc.c                        | 11 +++--
 hw/mem/pc-dimm.c                    |  2 +
 hw/pci-bridge/pci_expander_bridge.c |  2 +
 hw/ppc/spapr.c                      | 25 ++++++++--
 hw/ppc/spapr_pci.c                  |  2 +
 include/hw/acpi/aml-build.h         |  2 +-
 include/hw/boards.h                 | 22 +++++++++
 include/sysemu/numa.h               | 13 +----
 monitor.c                           |  4 +-
 numa.c                              | 74 +++++++++++++++++------------
 17 files changed, 155 insertions(+), 70 deletions(-)

-- 
2.17.1