summary refs log tree commit diff stats
path: root/hw/i386/acpi-build.c
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel@redhat.com>2015-06-02 14:23:10 +0300
committerMichael S. Tsirkin <mst@redhat.com>2015-06-03 18:19:18 +0200
commit0e79e51a7dcbd4fde5738d713b60f0fb0321f1af (patch)
tree36826c0eb97d56bb4e7ebc2fb8112e82e85a728a /hw/i386/acpi-build.c
parent6a3042b23bbb1fa92c00ea9267c830e7f2e99313 (diff)
downloadfocaccia-qemu-0e79e51a7dcbd4fde5738d713b60f0fb0321f1af.tar.gz
focaccia-qemu-0e79e51a7dcbd4fde5738d713b60f0fb0321f1af.zip
hw/pxb: add numa_node parameter
The pxb can be attach to and existing numa node by specifying
numa_node option that equals the desired numa nodeid.

Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'hw/i386/acpi-build.c')
-rw-r--r--hw/i386/acpi-build.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 129098365d..45c36a88bd 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -902,6 +902,7 @@ build_ssdt(GArray *table_data, GArray *linker,
     if (bus) {
         QLIST_FOREACH(bus, &bus->child, sibling) {
             uint8_t bus_num = pci_bus_num(bus);
+            uint8_t numa_node = pci_bus_numa_node(bus);
 
             /* look only for expander root buses */
             if (!pci_bus_is_root(bus)) {
@@ -918,6 +919,11 @@ build_ssdt(GArray *table_data, GArray *linker,
                        aml_name_decl("_UID", aml_string("PC%.02X", bus_num)));
             aml_append(dev, aml_name_decl("_HID", aml_string("PNP0A03")));
             aml_append(dev, aml_name_decl("_BBN", aml_int(bus_num)));
+
+            if (numa_node != NUMA_NODE_UNASSIGNED) {
+                aml_append(dev, aml_name_decl("_PXM", aml_int(numa_node)));
+            }
+
             aml_append(dev, build_prt());
             crs = build_crs(PCI_HOST_BRIDGE(BUS(bus)->parent),
                             io_ranges, mem_ranges);