From nobody Wed Nov 27 19:28:02 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=1697645288; cv=none; d=zohomail.com; s=zohoarc; b=ad+FhrSJqEAqUx77H7u5zc8wRhKTn0xZfbyl7cXELegFMIUCEzafykjl/lWAjDnoALLZNH7P8ibC40fnYpXfJxw68ME0kofafIdEzQeluxZ4C064Y8jg+RgnZOdVW/u6I5zc23I8rj9yxwaaSInWx/wQx52iKLLPm7g4fw0J4N4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697645288; 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=Sr5apWx/ScK9oB1nRm3T8OXKBnRMu7sHdlMje9yDWyM=; b=W86W0dE/at6d2G5epWKTW7QP35KlTO2t4Wey+9AJwDZOVdbgOEvQ3q+9IdgjE7sfOkVL5q/92dg7gk59+++tfhyiMVSaz0bNXAed/3tfAgPEY7rreKjdU2kvOkfPPfWJuANq9ErCEz4t9z98pOpEDwWw/13CdJWvGmfgNfP6YtE= 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 169764528894179.62426954467071; Wed, 18 Oct 2023 09:08:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt8tx-000365-S3; Wed, 18 Oct 2023 11:56:06 -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 1qt8sp-0002Fy-7c for qemu-devel@nongnu.org; Wed, 18 Oct 2023 11:54:56 -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 1qt8sl-0006Uy-Di for qemu-devel@nongnu.org; Wed, 18 Oct 2023 11:54:53 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-490-ZbQdVtuANcSrGPnMLREJww-1; Wed, 18 Oct 2023 11:54:49 -0400 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-40554735995so52005205e9.1 for ; Wed, 18 Oct 2023 08:54:49 -0700 (PDT) Received: from redhat.com ([2a02:14f:1f2:2037:f34:d61b:7da0:a7be]) by smtp.gmail.com with ESMTPSA id b24-20020a05600c06d800b004064e3b94afsm1995242wmn.4.2023.10.18.08.54.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 08:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697644490; 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=Sr5apWx/ScK9oB1nRm3T8OXKBnRMu7sHdlMje9yDWyM=; b=OvunazprAv3RUEkpajfM3AiM+i5Gu+uvnzLq0fX6e284+0FKMi5aaAe1qlGMu1bOS79IB3 07mJAN0ltOYL8XSKpxOvK9NzwzvmYOoFVOckH4LHn5b3bAyicEwViEIkSWBiG9301vF0J4 Sa3i28X05fSu5IgI/xvU15Wis/plojI= X-MC-Unique: ZbQdVtuANcSrGPnMLREJww-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697644488; x=1698249288; 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=Sr5apWx/ScK9oB1nRm3T8OXKBnRMu7sHdlMje9yDWyM=; b=j01uLWH6fq9VfIMFHNqnslj9v31bYtPPyVMakyCSLDtxNDLS3gOx3iNjMxUGF/6KHb 3+DmGZl7dTrrmfb3h3m7DyyKehJQnv0MPTU/EFYiD3FKVP5g/TgwsaF5kAhymVsiH3oi BFy54OPgR3w65iRyzJe9VsDf1qUKE03YqX16pLc9k0XTopsNHJOwMrGzIGcXoGqM6Q26 nJz6Qtl/gt1xmyUHV8efbaW5ECik8C1lbGL7J8DMH4hUYBXaDuuB/sWEJdDsBcBaOHVt 3plBtxfqta+2U0XWHVLZ+R+03mRLygGKhqCH2V9S6fpxqsUomrTWPzprQ4gJ3GCffEV5 qd7Q== X-Gm-Message-State: AOJu0YzI3e7p/ShagZ0MFnjTufGEJqQojMmZm0G+M3fJg7OS/fPivebX WvsG6Kqlhxpta84AOc20F3kMxLHSzkyIrNOIilVjfF47Ua6x9LRBo2+3NvB+aV5jRTD1yrWd6Cv rEisr3NXdLEb8AwAhVICHkaWDq60aIpKtGcYerKc8jXbnygE/4Zdh0aH8B4ul9eHBaesIaWg= X-Received: by 2002:a05:600c:5251:b0:406:411f:742e with SMTP id fc17-20020a05600c525100b00406411f742emr4447007wmb.34.1697644487793; Wed, 18 Oct 2023 08:54:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbQtUl+ym/B431elIpSmuOJkiL2wQuZ3F/CELEczzm7uo7bmIGPNPC8yGifDLgwufgwqNUfw== X-Received: by 2002:a05:600c:5251:b0:406:411f:742e with SMTP id fc17-20020a05600c525100b00406411f742emr4446990wmb.34.1697644487469; Wed, 18 Oct 2023 08:54:47 -0700 (PDT) Date: Wed, 18 Oct 2023 11:54:43 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Zhao Liu , Igor Mammedov , Ani Sinha Subject: [PULL 21/83] tests: bios-tables-test: Extend smbios core count2 test to cover general topology Message-ID: <4d47fd5f5bdc030b1c6054c43e932d69a1c7580f.1697644299.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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 1697645290872100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Zhao Liu The commit 196ea60a734c3 ("hw/smbios: Fix core count in type4") fixed the miscalculation of cores per socket. The original core count2 test (with the topology configured by "-smp 275") didn't recognize that topology-related but because it just created a special topology with only one socket and one die by default, ignoring the effect of more topology levels (between socket and core) on the cores per socket calculation. So for the topology in this case, there're the following considerations: 1. cores per socket should be more than 255 to ensure we could cover the core count2 field. 2. The original bug was that cores per socket was miscalculated, so now we should include as many topology levels as possible (mutiple sockets or dies, no module since x86 hasn't supported it) to cover more general topology scenarios, to ensure that the cores per socket encoded in the core count2 field is correct. Based on these considerations, select the topology with multiple dies: -smp 260,dies=3D2,cores=3D130,threads=3D1 Note, here we doesn't configure multiple sockets to avoid the error ("kvm_init_vcpu: kvm_get_vcpu failed (*): Too many open files") if user uses the default ulimit seeting on his machine. And the cores per socket calculation for multiple sockets has already been covered by the core count test case, so that only multiple dies configuration is enough. The expected core count2 =3D cores per socket =3D cores (130) * dies (2) = =3D 260. Suggested-by: Igor Mammedov Signed-off-by: Zhao Liu Acked-by: Igor Mammedov Message-Id: <20230928125943.1816922-10-zhao1.liu@linux.intel.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index c20f6f73d0..f3af20cf2c 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1024,10 +1024,12 @@ static void test_acpi_q35_tcg_core_count2(void) .required_struct_types =3D base_required_struct_types, .required_struct_types_len =3D ARRAY_SIZE(base_required_struct_typ= es), .smbios_core_count =3D 0xFF, - .smbios_core_count2 =3D 275, + .smbios_core_count2 =3D 260, }; =20 - test_acpi_one("-machine smbios-entry-point-type=3D64 -smp 275", &data); + test_acpi_one("-machine smbios-entry-point-type=3D64 " + "-smp 260,dies=3D2,cores=3D130,threads=3D1", + &data); free_test_data(&data); } =20 --=20 MST