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+-Q87OY%Ac_dV@
zBJn~8l2OnV!I~1#R3uce&IssC6!fZKofXj8NT^`NeLD1YE(-dNVATXvi-Zc+w1B3g
zpzjLSc>$e|gbLOL0bPiK76mIZKMYHcgbLOd1oVX{Xi2c15zsS{P{DduK+i@&4Z*r7
zpo@`E!Fo<W&qYB^!Fpam&qqQ9>ym&jMM2Ag^+f@FF%l|RUlP!lqM)mS^=AV5vq-35
zy&#|$PJ`-|CG%#z8SAI^JGh!0Qmxww1PubJStw*k5SnWcP?18-0STm;+3zHAuQ_y3
zR)$iHq>)a6gyJyNk*&8!Ix>bOKGc!5m649jVWAFnWbZ2J=Jq?NuGmEm9V|E@V;_Nh
ztjBJ0=wRsxJ?>tRkM$bKSOh|!3FKq_HIk9eLVpm*$NC^*B&N_~GdXmOF+D|%6dUO&
uZgWgekt10~`V7fq`fHFe?IZmG$<XT;=-`15?DVCSrVxAGrZjArT>dYwdQV#b
literal 0
HcmV?d00001
new file mode 100644
GIT binary patch
literal 48
scmWIc@eDCwU|?X>aq@Te2v%^42yhMtiZKGkKx`1r1jHb~B`V4V0NaKK0RR91
literal 0
HcmV?d00001
new file mode 100644
GIT binary patch
literal 264
zcmWFzatz^MWME*N>*Vk35v<@85#SsQ6axw|fY=}!gyBE{mCvYwA`4W;1y_nJgHQ)F
m01Q5`!xW;bgNZV5z*$fR4t40tQ1}RY;qLwcQ@{*k0BHdBCkg=o
literal 0
HcmV?d00001
new file mode 100644
GIT binary patch
literal 9147
zcmcgyO>Y~=8J;C6YBi*!rL>mik3@tWG;Nv>N^+f|AA!kTie$u<D3VSb&;ZwN+)7E?
zEEK0m8U&COARj&yNSFlejSl!PdT4$^ZVk{=ue}yUe2V(KGduFkk^<sGs{=Lf?DM?u
zJhQX&EO+U5{O(^bGiJR~+4kz4V&z85^U-H9#;8sIokr#+>mB%&THng0GFI;}C))U^
z*zVJQ<$BHf^KSS>7~cIbv~ET0_Lt7*w{J!7e-z$k1bXXs#5pybP2TTR`n@BMx4cHl
z?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
new file mode 100644
GIT binary patch
literal 48
scmWIc@eDCwU|?X>aq@Te2v%^42yhMtiZKGkKx`1r1jHb~B`V4V0NaKK0RR91
literal 0
HcmV?d00001
new file mode 100644
GIT binary patch
literal 264
zcmWFzatz^MWME*N>*Vk35v<@85#SsQ6axw|fY=}!gyBE{mCvYwA`4W;1y_nJgHQ)F
m01Q5`!xW;bgNZV5z*$fR4t40tQ1}RY;qLwcQ@{*k0BHdBCkg=o
literal 0
HcmV?d00001
@@ -808,6 +808,34 @@ 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(" -m 128,slots=3,maxmem=1G"
+ " -numa node -numa node,mem=128"
+ " -numa dist,src=0,dst=1,val=21",
+ &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(" -m 128,slots=3,maxmem=1G"
+ " -numa node -numa node,mem=128"
+ " -numa dist,src=0,dst=1,val=21",
+ &data);
+ free_test_data(&data);
+}
+
int main(int argc, char *argv[])
{
const char *arch = qtest_get_arch();
@@ -830,6 +858,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 -> 6463 bytes tests/acpi-test-data/pc/SLIT.numamem | Bin 0 -> 48 bytes tests/acpi-test-data/pc/SRAT.numamem | Bin 0 -> 264 bytes tests/acpi-test-data/q35/DSDT.numamem | Bin 0 -> 9147 bytes tests/acpi-test-data/q35/SLIT.numamem | Bin 0 -> 48 bytes tests/acpi-test-data/q35/SRAT.numamem | Bin 0 -> 264 bytes tests/bios-tables-test.c | 30 ++++++++++++++++++++++++++++++ 7 files changed, 30 insertions(+) create mode 100644 tests/acpi-test-data/pc/DSDT.numamem create mode 100644 tests/acpi-test-data/pc/SLIT.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/SLIT.numamem create mode 100644 tests/acpi-test-data/q35/SRAT.numamem