[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 32/63] tests: bios-tables-test: Extend smbios core count2 test to
From: |
Michael S. Tsirkin |
Subject: |
[PULL 32/63] tests: bios-tables-test: Extend smbios core count2 test to cover general topology |
Date: |
Tue, 7 Nov 2023 05:11:50 -0500 |
From: Zhao Liu <zhao1.liu@intel.com>
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 (multiple
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=2,cores=130,threads=1
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 = cores per socket = cores (130) * dies (2) =
260.
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20231023094635.1588282-10-zhao1.liu@linux.intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
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 = base_required_struct_types,
.required_struct_types_len = ARRAY_SIZE(base_required_struct_types),
.smbios_core_count = 0xFF,
- .smbios_core_count2 = 275,
+ .smbios_core_count2 = 260,
};
- test_acpi_one("-machine smbios-entry-point-type=64 -smp 275", &data);
+ test_acpi_one("-machine smbios-entry-point-type=64 "
+ "-smp 260,dies=2,cores=130,threads=1",
+ &data);
free_test_data(&data);
}
--
MST
- [PULL 26/63] tests: bios-tables-test: Add test for smbios type4 count, (continued)
- [PULL 26/63] tests: bios-tables-test: Add test for smbios type4 count, Michael S. Tsirkin, 2023/11/07
- [PULL 27/63] tests: bios-tables-test: Add ACPI table binaries for smbios type4 count test, Michael S. Tsirkin, 2023/11/07
- [PULL 25/63] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 count test, Michael S. Tsirkin, 2023/11/07
- [PULL 28/63] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 core count test, Michael S. Tsirkin, 2023/11/07
- [PULL 29/63] tests: bios-tables-test: Add test for smbios type4 core count, Michael S. Tsirkin, 2023/11/07
- [PULL 31/63] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 core count2 test, Michael S. Tsirkin, 2023/11/07
- [PULL 30/63] tests: bios-tables-test: Add ACPI table binaries for smbios type4 core count test, Michael S. Tsirkin, 2023/11/07
- [PULL 34/63] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 thread count test, Michael S. Tsirkin, 2023/11/07
- [PULL 33/63] tests: bios-tables-test: Update ACPI table binaries for smbios core count2 test, Michael S. Tsirkin, 2023/11/07
- [PULL 35/63] tests: bios-tables-test: Add test for smbios type4 thread count, Michael S. Tsirkin, 2023/11/07
- [PULL 32/63] tests: bios-tables-test: Extend smbios core count2 test to cover general topology,
Michael S. Tsirkin <=
- [PULL 37/63] tests: bios-tables-test: Prepare the ACPI table change for smbios type4 thread count2 test, Michael S. Tsirkin, 2023/11/07
- [PULL 36/63] tests: bios-tables-test: Add ACPI table binaries for smbios type4 thread count test, Michael S. Tsirkin, 2023/11/07
- [PULL 39/63] tests: bios-tables-test: Add ACPI table binaries for smbios type4 thread count2 test, Michael S. Tsirkin, 2023/11/07
- [PULL 40/63] hw/cxl: Use a switch to explicitly check size in caps_reg_read(), Michael S. Tsirkin, 2023/11/07
- [PULL 41/63] hw/cxl: Use switch statements for read and write of cachemem registers, Michael S. Tsirkin, 2023/11/07
- [PULL 38/63] tests: bios-tables-test: Add test for smbios type4 thread count2, Michael S. Tsirkin, 2023/11/07
- [PULL 43/63] hw/cxl: Line length reductions, Michael S. Tsirkin, 2023/11/07
- [PULL 42/63] hw/cxl: CXLDVSECPortExtensions renamed to CXLDVSECPortExt, Michael S. Tsirkin, 2023/11/07
- [PULL 45/63] hw/cxl/mbox: Pull the payload out of struct cxl_cmd and make instances constant, Michael S. Tsirkin, 2023/11/07
- [PULL 44/63] hw/cxl: Fix a QEMU_BUILD_BUG_ON() in switch statement scope issue., Michael S. Tsirkin, 2023/11/07