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ueN8snoDMfSUGF5L6OY%}VBvUhcY?2hn@YA4_5EZcreNae
zdY`V^bXwsG!v|+5PA%tvPB5H=%~H3Ja~*;I^Yo+_<oa}m(@7zM87u^LbL32H-+dp~
z>)TBcT)-J!YgPJ{;x!yIUag|Dn+~)e&>p@HN9TF*bu46h@*0qfkF<PMo^t>6MP8)v
z-x{AI`oeP5p?Bz64%#gb>lZ@&fZd1QG0tQ0MTq}?j+=tqPtTJ_NAx^NpOoM|{Im-A
z?C9vbA9;s(_9iV`g*JvJ7eDi@^;WTjp~?FMwQDyBEI@WkZcauP-yoK=%UKI+U;fXw
zAn9E1&t+{3g|Pivf6lSpl#8VrpkLA+D(e5{h2`GftJPbfygBDLE6tlY64!{GsN!e*
z4BdwOb$g4~pQ^T8cg%H)MJ%|{3T<!i=bhrOB*5%g0*TRCiLm5G8`spvb>7If!u78B
EKkzjyY5)KL
literal 0
HcmV?d00001
new file mode 100644
GIT binary patch
literal 224
zcmWFzatwLEz`(%x#mV2<BUr&HBEUHqD8>jB1F=Cg2*ZH@DxXmUE`z~9*2k!U%mXRq
Yf~!ZCL8t>-1O^}2VG2>z!9?-X08OU~0RR91
literal 0
HcmV?d00001
@@ -808,6 +808,28 @@ static void test_acpi_piix4_tcg_memhp(void)
free_test_data(&data);
}
+static void test_acpi_q35_tcg_numamem(void)
+{
+ test_data data;
+
+ memset(&data, 0, sizeof(data));
+ data.machine = MACHINE_Q35;
+ data.variant = ".numamem";
+ test_acpi_one(" -numa node -numa node,mem=128", &data);
+ free_test_data(&data);
+}
+
+static void test_acpi_piix4_tcg_numamem(void)
+{
+ test_data data;
+
+ memset(&data, 0, sizeof(data));
+ data.machine = MACHINE_PC;
+ data.variant = ".numamem";
+ test_acpi_one(" -numa node -numa node,mem=128", &data);
+ free_test_data(&data);
+}
+
int main(int argc, char *argv[])
{
const char *arch = qtest_get_arch();
@@ -830,6 +852,8 @@ int main(int argc, char *argv[])
qtest_add_func("acpi/q35/cpuhp", test_acpi_q35_tcg_cphp);
qtest_add_func("acpi/piix4/memhp", test_acpi_piix4_tcg_memhp);
qtest_add_func("acpi/q35/memhp", test_acpi_q35_tcg_memhp);
+ qtest_add_func("acpi/piix4/numamem", test_acpi_piix4_tcg_numamem);
+ qtest_add_func("acpi/q35/numamem", test_acpi_q35_tcg_numamem);
}
ret = g_test_run();
boot_sector_cleanup(disk);
As QEMU supports the memory-less node, it is possible that there is no RAM in the first numa node(also be called as node0). eg: ... \ -m 128,slots=3,maxmem=1G \ -numa node -numa node,mem=128M \ But, this makes it hard for QEMU to build a known-to-work ACPI SRAT table. Only fixing it is not enough. Add a testcase for this situation to make sure the ACPI table is correct for guest. Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com> --- tests/acpi-test-data/pc/DSDT.numamem | Bin 0 -> 5104 bytes tests/acpi-test-data/pc/SRAT.numamem | Bin 0 -> 224 bytes tests/acpi-test-data/q35/DSDT.numamem | Bin 0 -> 7788 bytes tests/acpi-test-data/q35/SRAT.numamem | Bin 0 -> 224 bytes tests/bios-tables-test.c | 24 ++++++++++++++++++++++++ 5 files changed, 24 insertions(+) create mode 100644 tests/acpi-test-data/pc/DSDT.numamem create mode 100644 tests/acpi-test-data/pc/SRAT.numamem create mode 100644 tests/acpi-test-data/q35/DSDT.numamem create mode 100644 tests/acpi-test-data/q35/SRAT.numamem