From nobody Mon Nov 25 05:22:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1717528173; cv=none; d=zohomail.com; s=zohoarc; b=QCRZsnLnOen+M77SIreOMPLHGlxh0ZsDplGwHlAu5HfoYNrYdvP4DSxQw5jTcZMAjLCLposKWBSzipk59JUmvzH3vShuPCPikaic8uLh2DzCtzWr+lR9C5VGzKY3odAmAzvDkexjvy6pc5fFugf+cTwMmDJqnfg63FPWZ4hULiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717528173; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=C/pPfQru8bTuS9+eYSG9NAw/m9gJaYYAeXPgdlqxVn4=; b=OQ4ToOv5jQxMKrNrkph2h2waJT0eHlt8V5S2nyuXO/TffFPROR0K8oOxfWbfWgoeWxEFJoO45+AZEWPppgUoHW9a7S8kMnHxzKMaIvR/DWinB+WZ4AyfEifZw+ocuIrMbZbJQKVUEh2EdE80Tzju1Klr4Ea7xb2sLyNx6zwNlHY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717528173577531.460250206577; Tue, 4 Jun 2024 12:09:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEZW5-00066U-Ck; Tue, 04 Jun 2024 15:08:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEZW3-0005sS-P8 for qemu-devel@nongnu.org; Tue, 04 Jun 2024 15:08:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEZW0-0000zV-Nt for qemu-devel@nongnu.org; Tue, 04 Jun 2024 15:08:15 -0400 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-IfsphAAnPzq42slk_WmnLQ-1; Tue, 04 Jun 2024 15:08:10 -0400 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-35e50fe93a5so2484664f8f.3 for ; Tue, 04 Jun 2024 12:08:09 -0700 (PDT) Received: from redhat.com ([2a0d:6fc7:552:cf5c:2b13:215c:b9df:f231]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd064afd8sm12314270f8f.95.2024.06.04.12.08.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 12:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717528091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=C/pPfQru8bTuS9+eYSG9NAw/m9gJaYYAeXPgdlqxVn4=; b=TRxQhf70lArVHDdYlrrFd7cwllV0Ln34mLK5g0mkGghC/wL9cEbmhjrhoQN08LBxHI3b+j m8WhYx74s0KlnG18nZSPgJ+jHGUYi0tPvi7zekL1rFkidU+Qsy0LGVnFXSJZT+vJLc2W/X a8QRLfjOPbfrzU210IKLA8E4RSX3UJ8= X-MC-Unique: IfsphAAnPzq42slk_WmnLQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717528088; x=1718132888; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=C/pPfQru8bTuS9+eYSG9NAw/m9gJaYYAeXPgdlqxVn4=; b=kcOUFv28vpOAuoQ20CrFYks7Z0YSygvdATokcyHc2hEb/JkaBXwoaDszTspw1R05+N XTtqf8jK4LVO5kNrXBDwGRKlVeQh4pejIRcNF86ZhqE2LuESKXXEIkl463OteM4KQ85+ 3hgwu1SJFHtfwpaeZOwNpkRh4N22SKCeLLsAZQibxQN87pmLG38UUZYDaUPr1iG3nGDc 8XoQ+EYs9DFj7KXpeSIwu5BLZwBxKK3FU2lAQWv2pKa5Bny8HexqZBzC/lcyMBsTYyrZ 4iM04YKcoGqKKYlwTg9liw2jJ+jSZ6En+HA5rwHm2kycU8GUoQU7orWJ2/WzJWotIkId AfvQ== X-Gm-Message-State: AOJu0Yzocatc57Q29omP0UvWR9AkSi7c+NvcobDWgPXRmPZJ+9cjR8w6 8XvtXZBL9uAgyiPAeQWKmdV1K1yU9gKsVxIhBAb9wU68vFTlOGwDnV3SKV/OMfG/DFT4aMmDyiL 3zyTnSpNDCbiiZLicw/0ct0Trp/ujnvuhCkrEsSmHB7WFMM8dJlvZbrBB6IvGyACu6B0kdJjaFm 2Z+laCa3h8ggPmTjJEivroAP9g+gxKOg== X-Received: by 2002:adf:face:0:b0:35a:e90b:5474 with SMTP id ffacd0b85a97d-35e840494e7mr235583f8f.2.1717528088331; Tue, 04 Jun 2024 12:08:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFd05LZFHilV3739r92v+dC/xUoybqIfk45A3yOXGdMdDtBbowCxsSsuww+Qx0LEl5JSLGUTA== X-Received: by 2002:adf:face:0:b0:35a:e90b:5474 with SMTP id ffacd0b85a97d-35e840494e7mr235562f8f.2.1717528087832; Tue, 04 Jun 2024 12:08:07 -0700 (PDT) Date: Tue, 4 Jun 2024 15:08:04 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Jonathan Cameron , Igor Mammedov , Ani Sinha Subject: [PULL 35/46] bios-tables-test: Add complex SRAT / HMAT test for GI GP Message-ID: <4c4979cc62f7db9a137c21d64e01766535272fbe.1717527933.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1717528174425100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jonathan Cameron Add a test with 6 nodes to exercise most interesting corner cases of SRAT and HMAT generation including the new Generic Initiator and Generic Port Affinity structures. More details of the set up in the following patch adding the table data. Signed-off-by: Jonathan Cameron Message-Id: <20240524100507.32106-6-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 92 ++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index d1ff4db7a2..1651d06b7b 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1862,6 +1862,96 @@ static void test_acpi_q35_tcg_acpi_hmat_noinitiator(= void) free_test_data(&data); } =20 +/* Test intended to hit corner cases of SRAT and HMAT */ +static void test_acpi_q35_tcg_acpi_hmat_generic_x(void) +{ + test_data data =3D {}; + + data.machine =3D MACHINE_Q35; + data.variant =3D ".acpihmat-generic-x"; + test_acpi_one(" -machine hmat=3Don,cxl=3Don" + " -smp 3,sockets=3D3" + " -m 128M,maxmem=3D384M,slots=3D2" + " -device virtio-rng-pci,id=3Dgidev" + " -device pxb-cxl,bus_nr=3D64,bus=3Dpcie.0,id=3Dcxl.1" + " -object memory-backend-ram,size=3D64M,id=3Dram0" + " -object memory-backend-ram,size=3D64M,id=3Dram1" + " -numa node,nodeid=3D0,cpus=3D0,memdev=3Dram0" + " -numa node,nodeid=3D1" + " -object acpi-generic-initiator,id=3Dgi0,pci-dev=3Dgide= v,node=3D1" + " -numa node,nodeid=3D2" + " -object acpi-generic-port,id=3Dgp0,pci-bus=3Dcxl.1,nod= e=3D2" + " -numa node,nodeid=3D3,cpus=3D1" + " -numa node,nodeid=3D4,memdev=3Dram1" + " -numa node,nodeid=3D5,cpus=3D2" + " -numa hmat-lb,initiator=3D0,target=3D0,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D10" + " -numa hmat-lb,initiator=3D0,target=3D0,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D800M" + " -numa hmat-lb,initiator=3D0,target=3D2,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D100" + " -numa hmat-lb,initiator=3D0,target=3D2,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D200M" + " -numa hmat-lb,initiator=3D0,target=3D4,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D100" + " -numa hmat-lb,initiator=3D0,target=3D4,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D200M" + " -numa hmat-lb,initiator=3D0,target=3D5,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D200" + " -numa hmat-lb,initiator=3D0,target=3D5,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D400M" + " -numa hmat-lb,initiator=3D1,target=3D0,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D500" + " -numa hmat-lb,initiator=3D1,target=3D0,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D100M" + " -numa hmat-lb,initiator=3D1,target=3D2,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D50" + " -numa hmat-lb,initiator=3D1,target=3D2,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D400M" + " -numa hmat-lb,initiator=3D1,target=3D4,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D50" + " -numa hmat-lb,initiator=3D1,target=3D4,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D800M" + " -numa hmat-lb,initiator=3D1,target=3D5,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D500" + " -numa hmat-lb,initiator=3D1,target=3D5,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D100M" + " -numa hmat-lb,initiator=3D3,target=3D0,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D20" + " -numa hmat-lb,initiator=3D3,target=3D0,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D400M" + " -numa hmat-lb,initiator=3D3,target=3D2,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D80" + " -numa hmat-lb,initiator=3D3,target=3D2,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D200M" + " -numa hmat-lb,initiator=3D3,target=3D4,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D80" + " -numa hmat-lb,initiator=3D3,target=3D4,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D200M" + " -numa hmat-lb,initiator=3D3,target=3D5,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D20" + " -numa hmat-lb,initiator=3D3,target=3D5,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D400M" + " -numa hmat-lb,initiator=3D5,target=3D0,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D20" + " -numa hmat-lb,initiator=3D5,target=3D0,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D400M" + " -numa hmat-lb,initiator=3D5,target=3D2,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D80" + " -numa hmat-lb,initiator=3D5,target=3D4,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D200M" + " -numa hmat-lb,initiator=3D5,target=3D4,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D80" + " -numa hmat-lb,initiator=3D5,target=3D2,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D200M" + " -numa hmat-lb,initiator=3D5,target=3D5,hierarchy=3Dmem= ory," + "data-type=3Daccess-latency,latency=3D10" + " -numa hmat-lb,initiator=3D5,target=3D5,hierarchy=3Dmem= ory," + "data-type=3Daccess-bandwidth,bandwidth=3D800M", + &data); + free_test_data(&data); +} + #ifdef CONFIG_POSIX static void test_acpi_erst(const char *machine) { @@ -2304,6 +2394,8 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/nohpet", test_acpi_q35_tcg_nohpet); qtest_add_func("acpi/q35/acpihmat-noinitiator", test_acpi_q35_tcg_acpi_hmat_noinitiator); + qtest_add_func("acpi/q35/acpihmat-genericx", + test_acpi_q35_tcg_acpi_hmat_generic_x); =20 /* i386 does not support memory hotplug */ if (strcmp(arch, "i386")) { --=20 MST