[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 65/68] hmat acpi: Do not add Memory Proximity Domain Attributes St
From: |
Michael S. Tsirkin |
Subject: |
[PULL 65/68] hmat acpi: Do not add Memory Proximity Domain Attributes Structure targetting non existent memory. |
Date: |
Tue, 12 Mar 2024 18:29:01 -0400 |
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
If qemu is started with a proximity node containing CPUs alone,
it will provide one of these structures to say memory in this
node is directly connected to itself.
This description is arguably pointless even if there is memory
in the node. If there is no memory present, and hence no SRAT
entry it breaks Linux HMAT passing and the table is rejected.
https://elixir.bootlin.com/linux/v6.7/source/drivers/acpi/numa/hmat.c#L444
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240307160326.31570-2-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/acpi/hmat.c | 7 +++++++
1 file changed, 7 insertions(+)
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) {
--
MST
- [PULL 55/68] hw/acpi: Implement the SRAT GI affinity structure, (continued)
- [PULL 55/68] hw/acpi: Implement the SRAT GI affinity structure, Michael S. Tsirkin, 2024/03/12
- [PULL 57/68] virtio-iommu: Add a granule property, Michael S. Tsirkin, 2024/03/12
- [PULL 56/68] hw/i386/acpi-build: Add support for SRAT Generic Initiator structures, Michael S. Tsirkin, 2024/03/12
- [PULL 62/68] hw/i386/q35: Set virtio-iommu aw-bits default value to 39, Michael S. Tsirkin, 2024/03/12
- [PULL 60/68] virtio-iommu: Trace domain range limits as unsigned int, Michael S. Tsirkin, 2024/03/12
- [PULL 64/68] qemu-options.hx: Document the virtio-iommu-pci aw-bits option, Michael S. Tsirkin, 2024/03/12
- [PULL 67/68] hw/cxl: Fix missing reserved data in CXL Device DVSEC, Michael S. Tsirkin, 2024/03/12
- [PULL 68/68] docs/specs/pvpanic: document shutdown event, Michael S. Tsirkin, 2024/03/12
- [PULL 59/68] qemu-options.hx: Document the virtio-iommu-pci granule option, Michael S. Tsirkin, 2024/03/12
- [PULL 61/68] virtio-iommu: Add an option to define the input range width, Michael S. Tsirkin, 2024/03/12
- [PULL 65/68] hmat acpi: Do not add Memory Proximity Domain Attributes Structure targetting non existent memory.,
Michael S. Tsirkin <=
- [PULL 63/68] hw/arm/virt: Set virtio-iommu aw-bits default value to 48, Michael S. Tsirkin, 2024/03/12
- Re: [PULL 00/68] virtio,pc,pci: features, cleanups, fixes, Peter Maydell, 2024/03/13