[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v14 11/11] tests/bios-tables-test: add test cases for ACPI HM
From: |
Michael S. Tsirkin |
Subject: |
Re: [PATCH v14 11/11] tests/bios-tables-test: add test cases for ACPI HMAT |
Date: |
Mon, 28 Oct 2019 04:39:44 -0400 |
On Mon, Oct 28, 2019 at 03:52:20PM +0800, Tao Xu wrote:
> ACPI table HMAT has been introduced, QEMU now builds HMAT tables for
> Heterogeneous Memory with boot option '-numa node'.
>
> Add test cases on PC and Q35 machines with 2 numa nodes.
> Because HMAT is generated when system enable numa, the
> following tables need to be added for this test:
> tests/acpi-test-data/pc/*.acpihmat
> tests/acpi-test-data/pc/HMAT.*
> tests/acpi-test-data/q35/*.acpihmat
> tests/acpi-test-data/q35/HMAT.*
>
> Reviewed-by: Igor Mammedov <address@hidden>
> Reviewed-by: Daniel Black <address@hidden>
> Reviewed-by: Jingqi Liu <address@hidden>
> Suggested-by: Igor Mammedov <address@hidden>
> Signed-off-by: Tao Xu <address@hidden>
> ---
>
> No changes in v14.
>
> Changes in v13:
> - Use decimal notation with appropriate suffix for cache size
As you have seen adding tests like this breaks CI.
Pls see the comment at the beginning of tests/bios-tables-test.c
for how to add tests without breaking CI.
> ---
> tests/bios-tables-test.c | 44 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> index 0b33fb265f..96803c1f20 100644
> --- a/tests/bios-tables-test.c
> +++ b/tests/bios-tables-test.c
> @@ -947,6 +947,48 @@ static void test_acpi_virt_tcg_numamem(void)
>
> }
>
> +static void test_acpi_tcg_acpi_hmat(const char *machine)
> +{
> + test_data data;
> +
> + memset(&data, 0, sizeof(data));
> + data.machine = machine;
> + data.variant = ".acpihmat";
> + test_acpi_one(" -machine hmat=on"
> + " -smp 2,sockets=2"
> + " -m 128M,slots=2,maxmem=1G"
> + " -object memory-backend-ram,size=64M,id=m0"
> + " -object memory-backend-ram,size=64M,id=m1"
> + " -numa node,nodeid=0,memdev=m0"
> + " -numa node,nodeid=1,memdev=m1,initiator=0"
> + " -numa cpu,node-id=0,socket-id=0"
> + " -numa cpu,node-id=0,socket-id=1"
> + " -numa hmat-lb,initiator=0,target=0,hierarchy=memory,"
> + "data-type=access-latency,latency=5ns"
> + " -numa hmat-lb,initiator=0,target=0,hierarchy=memory,"
> + "data-type=access-bandwidth,bandwidth=500M"
> + " -numa hmat-lb,initiator=0,target=1,hierarchy=memory,"
> + "data-type=access-latency,latency=10ns"
> + " -numa hmat-lb,initiator=0,target=1,hierarchy=memory,"
> + "data-type=access-bandwidth,bandwidth=100M"
> + " -numa
> hmat-cache,node-id=0,size=10K,level=1,assoc=direct,"
> + "policy=write-back,line=8"
> + " -numa
> hmat-cache,node-id=1,size=10K,level=1,assoc=direct,"
> + "policy=write-back,line=8",
> + &data);
> + free_test_data(&data);
> +}
> +
> +static void test_acpi_q35_tcg_acpi_hmat(void)
> +{
> + test_acpi_tcg_acpi_hmat(MACHINE_Q35);
> +}
> +
> +static void test_acpi_piix4_tcg_acpi_hmat(void)
> +{
> + test_acpi_tcg_acpi_hmat(MACHINE_PC);
> +}
> +
> static void test_acpi_virt_tcg(void)
> {
> test_data data = {
> @@ -991,6 +1033,8 @@ int main(int argc, char *argv[])
> qtest_add_func("acpi/q35/numamem", test_acpi_q35_tcg_numamem);
> qtest_add_func("acpi/piix4/dimmpxm", test_acpi_piix4_tcg_dimm_pxm);
> qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm);
> + qtest_add_func("acpi/piix4/acpihmat", test_acpi_piix4_tcg_acpi_hmat);
> + qtest_add_func("acpi/q35/acpihmat", test_acpi_q35_tcg_acpi_hmat);
> } else if (strcmp(arch, "aarch64") == 0) {
> qtest_add_func("acpi/virt", test_acpi_virt_tcg);
> qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem);
> --
> 2.20.1
- [PATCH v14 02/11] qapi: Add builtin type time, (continued)
- [PATCH v14 02/11] qapi: Add builtin type time, Tao Xu, 2019/10/28
- [PATCH v14 03/11] tests: Add test for QAPI builtin type time, Tao Xu, 2019/10/28
- [PATCH v14 04/11] numa: Extend CLI to provide initiator information for numa nodes, Tao Xu, 2019/10/28
- [PATCH v14 06/11] numa: Calculate hmat latency and bandwidth entry list, Tao Xu, 2019/10/28
- [PATCH v14 05/11] numa: Extend CLI to provide memory latency and bandwidth information, Tao Xu, 2019/10/28
- [PATCH v14 07/11] numa: Extend CLI to provide memory side cache information, Tao Xu, 2019/10/28
- [PATCH v14 08/11] hmat acpi: Build Memory Proximity Domain Attributes Structure(s), Tao Xu, 2019/10/28
- [PATCH v14 09/11] hmat acpi: Build System Locality Latency and Bandwidth Information Structure(s), Tao Xu, 2019/10/28
- [PATCH v14 10/11] hmat acpi: Build Memory Side Cache Information Structure(s), Tao Xu, 2019/10/28
- [PATCH v14 11/11] tests/bios-tables-test: add test cases for ACPI HMAT, Tao Xu, 2019/10/28
- Re: [PATCH v14 11/11] tests/bios-tables-test: add test cases for ACPI HMAT,
Michael S. Tsirkin <=
- Re: [PATCH v14 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT), no-reply, 2019/10/28