Message ID | 20240820-fix-numa-range-v1-1-c5d6b889996f@flygoat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [for-9.1] hw/loongarch: Fix length for lowram in ACPI SRAT | expand |
On 2024/8/21 上午2:42, Jiaxun Yang wrote: > The size of lowram should be "gap" instead of the whole node. > > This is failing kernel's sanity check: > > [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0xffffffff] > [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x80000000-0x16fffffff] > [ 0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x170000000-0x26fffffff] > [ 0.000000] Warning: node 0 [mem 0x00000000-0xffffffff] overlaps with itself [mem 0x80000000-0x16fffffff] > > Fixes: fc100011f38d ("hw/loongarch: Refine acpi srat table for numa memory") > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> > --- > hw/loongarch/acpi-build.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c > index 72bfc35ae6c2..2638f8743463 100644 > --- a/hw/loongarch/acpi-build.c > +++ b/hw/loongarch/acpi-build.c > @@ -218,7 +218,7 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine) > * highram: [VIRT_HIGHMEM_BASE, +(len - gap)) > */ > if (len >= gap) { > - build_srat_memory(table_data, base, len, i, MEM_AFFINITY_ENABLED); > + build_srat_memory(table_data, base, gap, i, MEM_AFFINITY_ENABLED); > len -= gap; > base = VIRT_HIGHMEM_BASE; > gap = machine->ram_size - VIRT_LOWMEM_SIZE; > > --- > base-commit: 075fd020afe3150a0e6c4b049705b358b597b65a > change-id: 20240820-fix-numa-range-f1f0302e138d > > Best regards, > Thanks for catching this. Reviewed-by: Bibo Mao <maobibo@loongson.cn>
On 20/8/24 20:42, Jiaxun Yang wrote: > The size of lowram should be "gap" instead of the whole node. > > This is failing kernel's sanity check: > > [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0xffffffff] > [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x80000000-0x16fffffff] > [ 0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x170000000-0x26fffffff] > [ 0.000000] Warning: node 0 [mem 0x00000000-0xffffffff] overlaps with itself [mem 0x80000000-0x16fffffff] > > Fixes: fc100011f38d ("hw/loongarch: Refine acpi srat table for numa memory") > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> > --- > hw/loongarch/acpi-build.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> This is just a warning, so not worth delaying the release IMHO.
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index 72bfc35ae6c2..2638f8743463 100644 --- a/hw/loongarch/acpi-build.c +++ b/hw/loongarch/acpi-build.c @@ -218,7 +218,7 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine) * highram: [VIRT_HIGHMEM_BASE, +(len - gap)) */ if (len >= gap) { - build_srat_memory(table_data, base, len, i, MEM_AFFINITY_ENABLED); + build_srat_memory(table_data, base, gap, i, MEM_AFFINITY_ENABLED); len -= gap; base = VIRT_HIGHMEM_BASE; gap = machine->ram_size - VIRT_LOWMEM_SIZE;
The size of lowram should be "gap" instead of the whole node. This is failing kernel's sanity check: [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0xffffffff] [ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x80000000-0x16fffffff] [ 0.000000] ACPI: SRAT: Node 1 PXM 1 [mem 0x170000000-0x26fffffff] [ 0.000000] Warning: node 0 [mem 0x00000000-0xffffffff] overlaps with itself [mem 0x80000000-0x16fffffff] Fixes: fc100011f38d ("hw/loongarch: Refine acpi srat table for numa memory") Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> --- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: 075fd020afe3150a0e6c4b049705b358b597b65a change-id: 20240820-fix-numa-range-f1f0302e138d Best regards,