From: Igor Mammedov <imammedo@redhat.com>
To: Hesham Almatary <hesham.almatary@huawei.com>
Cc: <jonathan.cameron@huawei.com>, <qemu-devel@nongnu.org>,
<yangyicong@huawei.com>, <chenxiang66@hisilicon.com>,
<linuxarm@huawei.com>, <qemu-arm@nongnu.org>,
<peter.maydell@linaro.org>, <wangyanan55@huawei.com>,
<marcel.apfelbaum@gmail.com>, <eduardo@habkost.net>,
<Brice.Goglin@inria.fr>, <mst@redhat.com>
Subject: Re: [PATCH 3/8] tests: acpi: q35: add test for hmat nodes without initiators
Date: Mon, 18 Jul 2022 16:19:55 +0200 [thread overview]
Message-ID: <20220718161955.071bbc5b@redhat.com> (raw)
In-Reply-To: <20220711104436.8363-4-hesham.almatary@huawei.com>
On Mon, 11 Jul 2022 11:44:31 +0100
Hesham Almatary <hesham.almatary@huawei.com> wrote:
> From: Brice Goglin <Brice.Goglin@inria.fr>
>
> expected HMAT:
>
> [000h 0000 4] Signature : "HMAT" [Heterogeneous Memory Attributes Table]
> [004h 0004 4] Table Length : 00000120
> [008h 0008 1] Revision : 02
> [009h 0009 1] Checksum : 4F
> [00Ah 0010 6] Oem ID : "BOCHS "
> [010h 0016 8] Oem Table ID : "BXPC "
> [018h 0024 4] Oem Revision : 00000001
> [01Ch 0028 4] Asl Compiler ID : "BXPC"
> [020h 0032 4] Asl Compiler Revision : 00000001
>
> [024h 0036 4] Reserved : 00000000
>
> [028h 0040 2] Structure Type : 0000 [Memory Proximity Domain Attributes]
> [02Ah 0042 2] Reserved : 0000
> [02Ch 0044 4] Length : 00000028
> [030h 0048 2] Flags (decoded below) : 0001
> Processor Proximity Domain Valid : 1
> [032h 0050 2] Reserved1 : 0000
> [034h 0052 4] Attached Initiator Proximity Domain : 00000000
> [038h 0056 4] Memory Proximity Domain : 00000000
> [03Ch 0060 4] Reserved2 : 00000000
> [040h 0064 8] Reserved3 : 0000000000000000
> [048h 0072 8] Reserved4 : 0000000000000000
>
> [050h 0080 2] Structure Type : 0000 [Memory Proximity Domain Attributes]
> [052h 0082 2] Reserved : 0000
> [054h 0084 4] Length : 00000028
> [058h 0088 2] Flags (decoded below) : 0001
> Processor Proximity Domain Valid : 1
> [05Ah 0090 2] Reserved1 : 0000
> [05Ch 0092 4] Attached Initiator Proximity Domain : 00000001
> [060h 0096 4] Memory Proximity Domain : 00000001
> [064h 0100 4] Reserved2 : 00000000
> [068h 0104 8] Reserved3 : 0000000000000000
> [070h 0112 8] Reserved4 : 0000000000000000
>
> [078h 0120 2] Structure Type : 0000 [Memory Proximity Domain Attributes]
> [07Ah 0122 2] Reserved : 0000
> [07Ch 0124 4] Length : 00000028
> [080h 0128 2] Flags (decoded below) : 0000
> Processor Proximity Domain Valid : 0
> [082h 0130 2] Reserved1 : 0000
> [084h 0132 4] Attached Initiator Proximity Domain : 00000080
> [088h 0136 4] Memory Proximity Domain : 00000002
> [08Ch 0140 4] Reserved2 : 00000000
> [090h 0144 8] Reserved3 : 0000000000000000
> [098h 0152 8] Reserved4 : 0000000000000000
>
> [0A0h 0160 2] Structure Type : 0001 [System Locality Latency and Bandwidth Information]
> [0A2h 0162 2] Reserved : 0000
> [0A4h 0164 4] Length : 00000040
> [0A8h 0168 1] Flags (decoded below) : 00
> Memory Hierarchy : 0
> [0A9h 0169 1] Data Type : 00
> [0AAh 0170 2] Reserved1 : 0000
> [0ACh 0172 4] Initiator Proximity Domains # : 00000002
> [0B0h 0176 4] Target Proximity Domains # : 00000003
> [0B4h 0180 4] Reserved2 : 00000000
> [0B8h 0184 8] Entry Base Unit : 0000000000002710
> [0C0h 0192 4] Initiator Proximity Domain List : 00000000
> [0C4h 0196 4] Initiator Proximity Domain List : 00000001
> [0C8h 0200 4] Target Proximity Domain List : 00000000
> [0CCh 0204 4] Target Proximity Domain List : 00000001
> [0D0h 0208 4] Target Proximity Domain List : 00000002
> [0D4h 0212 2] Entry : 0001
> [0D6h 0214 2] Entry : 0002
> [0D8h 0216 2] Entry : 0003
> [0DAh 0218 2] Entry : 0002
> [0DCh 0220 2] Entry : 0001
> [0DEh 0222 2] Entry : 0003
>
> [0E0h 0224 2] Structure Type : 0001 [System Locality Latency and Bandwidth Information]
> [0E2h 0226 2] Reserved : 0000
> [0E4h 0228 4] Length : 00000040
> [0E8h 0232 1] Flags (decoded below) : 00
> Memory Hierarchy : 0
> [0E9h 0233 1] Data Type : 03
> [0EAh 0234 2] Reserved1 : 0000
> [0ECh 0236 4] Initiator Proximity Domains # : 00000002
> [0F0h 0240 4] Target Proximity Domains # : 00000003
> [0F4h 0244 4] Reserved2 : 00000000
> [0F8h 0248 8] Entry Base Unit : 0000000000000001
> [100h 0256 4] Initiator Proximity Domain List : 00000000
> [104h 0260 4] Initiator Proximity Domain List : 00000001
> [108h 0264 4] Target Proximity Domain List : 00000000
> [10Ch 0268 4] Target Proximity Domain List : 00000001
> [110h 0272 4] Target Proximity Domain List : 00000002
> [114h 0276 2] Entry : 000A
> [116h 0278 2] Entry : 0005
> [118h 0280 2] Entry : 0001
> [11Ah 0282 2] Entry : 0005
> [11Ch 0284 2] Entry : 000A
> [11Eh 0286 2] Entry : 0001
>
> Raw Table Data: Length 288 (0x120)
>
> 0000: 48 4D 41 54 20 01 00 00 02 4F 42 4F 43 48 53 20 // HMAT ....OBOCHS
> 0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43 // BXPC ....BXPC
> 0020: 01 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 // ............(...
> 0030: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
> 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
> 0050: 00 00 00 00 28 00 00 00 01 00 00 00 01 00 00 00 // ....(...........
> 0060: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
> 0070: 00 00 00 00 00 00 00 00 00 00 00 00 28 00 00 00 // ............(...
> 0080: 00 00 00 00 80 00 00 00 02 00 00 00 00 00 00 00 // ................
> 0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ................
> 00A0: 01 00 00 00 40 00 00 00 00 00 00 00 02 00 00 00 // ....@...........
> 00B0: 03 00 00 00 00 00 00 00 10 27 00 00 00 00 00 00 // .........'......
> 00C0: 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 // ................
> 00D0: 02 00 00 00 01 00 02 00 03 00 02 00 01 00 03 00 // ................
> 00E0: 01 00 00 00 40 00 00 00 00 03 00 00 02 00 00 00 // ....@...........
> 00F0: 03 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 // ................
> 0100: 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 // ................
> 0110: 02 00 00 00 0A 00 05 00 01 00 05 00 0A 00 01 00 // ................
>
> Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
> ---
> tests/qtest/bios-tables-test.c | 46 ++++++++++++++++++++++++++++++++++
> 1 file changed, 46 insertions(+)
>
> diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
> index 359916c228..f02b386d75 100644
> --- a/tests/qtest/bios-tables-test.c
> +++ b/tests/qtest/bios-tables-test.c
> @@ -1461,6 +1461,50 @@ static void test_acpi_piix4_tcg_acpi_hmat(void)
> test_acpi_tcg_acpi_hmat(MACHINE_PC);
> }
>
> +static void test_acpi_q35_tcg_acpi_hmat_noinitiator(void)
> +{
> + test_data data;
> +
> + memset(&data, 0, sizeof(data));
> + data.machine = MACHINE_Q35;
> + data.variant = ".acpihmat-noinitiator";
> + test_acpi_one(" -machine hmat=on"
> + " -smp 4"
> + " -m 128M"
> + " -object memory-backend-ram,size=32M,id=ram0"
> + " -object memory-backend-ram,size=32M,id=ram1"
> + " -object memory-backend-ram,size=64M,id=ram2"
> + " -numa node,nodeid=0,memdev=ram0,cpus=0-1"
> + " -numa node,nodeid=1,memdev=ram1,cpus=2-3"
don't use legacy syntax, see test_acpi_tcg_dimm_pxm() for example
> + " -numa node,nodeid=2,memdev=ram2"
> + " -numa hmat-lb,initiator=0,target=0,hierarchy=memory,"
> + "data-type=access-latency,latency=10"
> + " -numa hmat-lb,initiator=0,target=0,hierarchy=memory,"
> + "data-type=access-bandwidth,bandwidth=10485760"
> + " -numa hmat-lb,initiator=0,target=1,hierarchy=memory,"
> + "data-type=access-latency,latency=20"
> + " -numa hmat-lb,initiator=0,target=1,hierarchy=memory,"
> + "data-type=access-bandwidth,bandwidth=5242880"
> + " -numa hmat-lb,initiator=0,target=2,hierarchy=memory,"
> + "data-type=access-latency,latency=30"
> + " -numa hmat-lb,initiator=0,target=2,hierarchy=memory,"
> + "data-type=access-bandwidth,bandwidth=1048576"
> + " -numa hmat-lb,initiator=1,target=0,hierarchy=memory,"
> + "data-type=access-latency,latency=20"
> + " -numa hmat-lb,initiator=1,target=0,hierarchy=memory,"
> + "data-type=access-bandwidth,bandwidth=5242880"
> + " -numa hmat-lb,initiator=1,target=1,hierarchy=memory,"
> + "data-type=access-latency,latency=10"
> + " -numa hmat-lb,initiator=1,target=1,hierarchy=memory,"
> + "data-type=access-bandwidth,bandwidth=10485760"
> + " -numa hmat-lb,initiator=1,target=2,hierarchy=memory,"
> + "data-type=access-latency,latency=30"
> + " -numa hmat-lb,initiator=1,target=2,hierarchy=memory,"
> + "data-type=access-bandwidth,bandwidth=1048576",
> + &data);
> + free_test_data(&data);
> +}
> +
> static void test_acpi_erst(const char *machine)
> {
> gchar *tmp_path = g_dir_make_tmp("qemu-test-erst.XXXXXX", NULL);
> @@ -1803,6 +1847,8 @@ int main(int argc, char *argv[])
> 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);
> + qtest_add_func("acpi/q35/acpihmat-noinitiator",
> + test_acpi_q35_tcg_acpi_hmat_noinitiator);
> qtest_add_func("acpi/piix4/acpierst", test_acpi_piix4_acpi_erst);
> qtest_add_func("acpi/q35/acpierst", test_acpi_q35_acpi_erst);
> qtest_add_func("acpi/q35/applesmc", test_acpi_q35_applesmc);
next prev parent reply other threads:[~2022-07-18 14:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 10:44 [PATCH 0/8] AArch64/HMAT support and tests Hesham Almatary via
2022-07-11 10:44 ` [PATCH 1/8] hmat acpi: Don't require initiator value in -numa Hesham Almatary via
2022-07-15 3:41 ` Liu, Jingqi
2022-07-18 3:17 ` Liu, Jingqi
2022-07-18 5:43 ` Brice Goglin
2022-07-19 4:33 ` Liu, Jingqi
2022-07-18 13:54 ` Igor Mammedov
2022-07-18 13:57 ` Hesham Almatary via
2022-07-11 10:44 ` [PATCH 2/8] tests: acpi: add and whitelist *.hmat-noinitiator expected blobs Hesham Almatary via
2022-07-11 10:44 ` [PATCH 3/8] tests: acpi: q35: add test for hmat nodes without initiators Hesham Almatary via
2022-07-18 14:19 ` Igor Mammedov [this message]
2022-07-11 10:44 ` [PATCH 4/8] tests: acpi: q35: update expected blobs *.hmat-noinitiators Hesham Almatary via
2022-07-18 14:08 ` Igor Mammedov
2022-07-11 10:44 ` [PATCH 5/8] tests: Add HMAT AArch64/virt empty table files Hesham Almatary via
2022-07-18 14:10 ` Igor Mammedov
2022-07-11 10:44 ` [PATCH 6/8] hw/arm/virt: Enable HMAT on arm virt machine Hesham Almatary via
2022-07-18 14:12 ` Igor Mammedov
2022-07-11 10:44 ` [PATCH 7/8] tests: acpi: aarch64/virt: add a test for hmat nodes with no initiators Hesham Almatary via
2022-07-18 14:19 ` Igor Mammedov
2022-07-11 10:44 ` [PATCH 8/8] tests: virt: Update expected *.acpihmatvirt tables Hesham Almatary via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220718161955.071bbc5b@redhat.com \
--to=imammedo@redhat.com \
--cc=Brice.Goglin@inria.fr \
--cc=chenxiang66@hisilicon.com \
--cc=eduardo@habkost.net \
--cc=hesham.almatary@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=linuxarm@huawei.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=wangyanan55@huawei.com \
--cc=yangyicong@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).