summary refs log tree commit diff stats
path: root/hw
diff options
context:
space:
mode:
authorShannon Zhao <shannon.zhao@linaro.org>2016-05-12 13:22:28 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-05-12 13:22:28 +0100
commitea9fcbd7d0835c397c4a21939401a9b3e923ae90 (patch)
tree72127031336d76be950e7edc99340d0815d67488 /hw
parente6e400d54f092e3aeb17889120640bd24cda2ce1 (diff)
downloadfocaccia-qemu-ea9fcbd7d0835c397c4a21939401a9b3e923ae90.tar.gz
focaccia-qemu-ea9fcbd7d0835c397c4a21939401a9b3e923ae90.zip
ACPI: Fix the definition of proximity in AcpiSratMemoryAffinity
ACPI spec says that Proximity Domain is an "Integer that represents
the proximity domain to which the processor belongs". So define it as a
uint32_t.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-id: 1461667229-9216-4-git-send-email-zhaoshenglong@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/acpi-build.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 9ae4c0d4ea..3c031aaa86 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2440,8 +2440,7 @@ acpi_build_srat_memory(AcpiSratMemoryAffinity *numamem, uint64_t base,
 {
     numamem->type = ACPI_SRAT_MEMORY;
     numamem->length = sizeof(*numamem);
-    memset(numamem->proximity, 0, 4);
-    numamem->proximity[0] = node;
+    numamem->proximity = cpu_to_le32(node);
     numamem->flags = cpu_to_le32(flags);
     numamem->base_addr = cpu_to_le64(base);
     numamem->range_length = cpu_to_le64(len);