summary refs log tree commit diff stats
path: root/hw/acpi/hmat.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/acpi/hmat.c')
-rw-r--r--hw/acpi/hmat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/acpi/hmat.c b/hw/acpi/hmat.c
index 2242981e18..8ea240878a 100644
--- a/hw/acpi/hmat.c
+++ b/hw/acpi/hmat.c
@@ -204,6 +204,13 @@ static void hmat_build_table_structs(GArray *table_data, NumaState *numa_state)
     build_append_int_noprefix(table_data, 0, 4); /* Reserved */
 
     for (i = 0; i < numa_state->num_nodes; i++) {
+        /*
+         * Linux rejects whole HMAT table if a node with no memory
+         * has one of these structures listing it as a target.
+         */
+        if (!numa_state->nodes[i].node_mem) {
+            continue;
+        }
         flags = 0;
 
         if (numa_state->nodes[i].initiator < MAX_NODES) {