S390x: CPU Topology Information
v9 cover S390x: CPU Topology Information
Hi,
new version of the kvm-unit-test s390x CPU topology series.
0. what is new in this new spin
-------------------------------
- more configuration tested in unittests.cfg
- one of the tested configuration using 248 processors will failed until SCLP bug is corrected
- several cleanup
1. what is done
---------------
- First part is checking PTF errors, for KVM and LPAR
- Second part is checking PTF polarization change and STSI with the cpu topology including drawers and books. This tests are run for KVM only.
To run these tests under KVM successfully you need Linux 6.0 and the latest QEMU patches you find at:
https://lists.gnu.org/archive/html/qemu-devel/2023-04/msg04568.html
Note that Fedora-35 already has the CPU Topology backport for Linux.
To start the test in KVM just do:
# ./run_tests.sh topology
or something like:
# ./s390x-run s390x/topology.elf \ -smp 5,drawers=3,books=3,sockets=4,cores=4,maxcpus=144 \ -append '-drawers 3 -books 3 -sockets 4 -cores 4'
Of course the declaration of the number of drawers, books, socket and core must be coherent between -smp and -append arguments.
- Running the test on LPAR has been getestet on a46lp21
Regards,
Pierre
Pierre Morel (2):
s390x: topology: Check the Perform Topology Function
s390x: topology: Checking Configuration Topology Information
lib/s390x/sclp.c | 6 + lib/s390x/sclp.h | 4 +- lib/s390x/stsi.h | 36 ++++ s390x/Makefile | 1 + s390x/topology.c | 515 ++++++++++++++++++++++++++++++++++++++++++++ s390x/unittests.cfg | 14 ++ 6 files changed, 575 insertions(+), 1 deletion(-) create mode 100644 s390x/topology.c
Signature · 52 lines
2.31.1 new in v8: - use report_fail instead of report(0,... (Nico) - add 2 more configurations in unittests.cfg (Nico) new in v8: - define PTF_INVALID_FUNCTION (Claudio) - test every single bits for specification in the ptf instruction (Claudio) - test vertical polarization twice (Claudio) - add an assert(read_info) (Nico) - changed skips (Nico) new in v7: - better checks using device attributes on commandline (Pierre) - use builtin to get the number of CPU in the TLE mask (Thomas) - use Elvis (not dead) (Thomas) - reset before tests (Nina) - splitting test_ptf in small functions (Thomas) - check every ptf function code for program check (Nina) - Test made on LPAR (Janosch) - use a single page for SYSIB (Thomas) - abort on wrong parameter (Thomas) - implement SYSIB check with a recursive funtion (Nina) - diverse little changes (naming, clearer checks (Nina, Thomas)
PATCH v9 1/2 s390x: topology: Check the Perform Topology Function
We check that the PTF instruction is working correctly when the cpu topology facility is available.
For KVM only, we test changing of the polarity between horizontal and vertical and that a reset set the horizontal polarity.
--- s390x/Makefile | 1 + s390x/topology.c | 189 ++++++++++++++++++++++++++++++++++++++++++++ s390x/unittests.cfg | 3 + 3 files changed, 193 insertions(+) create mode 100644 s390x/topology.c
s390x/Makefile +1 -0
@@ -40,6 +40,7 @@ tests += $(TEST_DIR)/panic-loop-pgm.elf tests += $(TEST_DIR)/migration-sck.elf tests += $(TEST_DIR)/exittime.elf tests += $(TEST_DIR)/ex.elf +tests += $(TEST_DIR)/topology.elf pv-tests += $(TEST_DIR)/pv-diags.elf
s390x/topology.c new file +189 -0
189 lines not on this page · raw message
s390x/unittests.cfg +3 -0
@@ -218,3 +218,6 @@ extra_params = -append '--parallel' [execute] file = ex.elf + +[topology] +file = topology.elf
Signature · 1 line
2.31.1
Re: [kvm-unit-tests PATCH v9 1/2] s390x: topology: Check the Perform Topology Function
Quoting Pierre Morel (2023-05-19 13:22:35)
[...]
Quoted 5 lines
s390x/topology.c new file +0
-0
[...]
s390x/topology.c line 52
Quoted 6 lines
s390x/topology.c new file +6
-0+static void check_privilege (int fc) +{ +unsigned long rc; + +report_prefix_push ("Privilege" ); +report_info ("function code %d" , fc);
report() messages should be unique.
Can you please make this a
report_prefix_pushf("Privileged fc %d", fc);
and get rid of the report_info()?
With this change:
Re: [kvm-unit-tests PATCH v9 1/2] s390x: topology: Check the Perform Topology Function
Quoted 16 lines · Nico Boehr
Quoting Pierre Morel (2023-05-19 13:22:35)
[...]Quoted 5 lines
s390x/topology.c new file +0
-0[...]
s390x/topology.c line 52
Quoted 6 lines
s390x/topology.c new file +6
-0+static void check_privilege (int fc) +{ +unsigned long rc; + +report_prefix_push ("Privilege" ); +report_info ("function code %d" , fc);
report()messages should be unique.
Quoted 7 lines
Can you please make this a
report_prefix_pushf("Privileged fc %d", fc);
and get rid of thereport_info()?With this change:
Reviewed-by Nico Boehr <[email protected]>
Yes, thanks
Pierre
PATCH v9 2/2 s390x: topology: Checking Configuration Topology Information
In reply to Pierre MorelSTSI with function code 15 is used to store the CPU configuration topology.
We retrieve the maximum nested level with SCLP and use the topology tree provided by the drawers, books, sockets, cores arguments.
We check :
- if the topology stored is coherent between the QEMU -smp parameters and kernel parameters.
- the number of CPUs
- the maximum number of CPUs
- the number of containers of each levels for every STSI(15.1.x) instruction allowed by the machine.
--- lib/s390x/sclp.c | 6 + lib/s390x/sclp.h | 4 +- lib/s390x/stsi.h | 36 +++++ s390x/topology.c | 326 ++++++++++++++++++++++++++++++++++++++++++++ s390x/unittests.cfg | 11 ++ 5 files changed, 382 insertions(+), 1 deletion(-)
lib/s390x/sclp.c +6 -0
@@ -238,3 +238,9 @@ uint64_t get_max_ram_size(void) {return max_ram_size; } + +uint64_t sclp_get_stsi_mnest (void ) +{ +assert (read_info); +return read_info->stsi_parm; +}
lib/s390x/sclp.h +3 -1
@@ -150,7 +150,8 @@ typedef struct ReadInfo {SCCBHeader h;uint16_t rnmax;uint8_t rnsize; -uint8_t _reserved1[16 -11 ];/* 11-15 */ +uint8_t _reserved1[15 -11 ];/* 11-14 */ +uint8_t stsi_parm;/* 15-15 */ uint16_t entries_cpu;/* 16-17 */ uint16_t offset_cpu;/* 18-19 */ uint8_t _reserved2[24 -20 ];/* 20-23 */
@@ -341,5 +342,6 @@ int sclp_service_call(unsigned int command, void *sccb);void sclp_memory_setup (void );uint64_t get_ram_size (void );uint64_t get_max_ram_size (void ); +uint64_t sclp_get_stsi_mnest (void );#endif /* _S390X_SCLP_H_ */
lib/s390x/stsi.h +36 -0
@@ -29,4 +29,40 @@ struct sysinfo_3_2_2 { uint8_t ext_names[8][256]; }; +#define CPUS_TLE_RES_BITS 0x00fffffff8000000UL +struct topology_core { +uint8_t nl; +uint8_t reserved1[3 ]; +uint8_t reserved4:5 ; +uint8_t d:1 ; +uint8_t pp:2 ; +uint8_t type; +uint16_t origin; +uint64_t mask; +}; + +#define CONTAINER_TLE_RES_BITS 0x00ffffffffffff00UL +struct topology_container { +uint8_t nl; +uint8_t reserved[6 ]; +uint8_t id; +}; + +union topology_entry { +uint8_t nl; +struct topology_core cpu; +struct topology_container container; +}; + +#define CPU_TOPOLOGY_MAX_LEVEL 6 +struct sysinfo_15_1_x { +uint8_t reserved0[2 ]; +uint16_t length; +uint8_t mag[CPU_TOPOLOGY_MAX_LEVEL ]; +uint8_t reserved0a; +uint8_t mnest; +uint8_t reserved0c[4 ]; +union topology_entry tle[]; +}; +#endif /* _S390X_STSI_H_ */
s390x/topology.c +326 -0
349 lines not on this page · raw message
s390x/unittests.cfg +11 -0
@@ -221,3 +221,14 @@ file = ex.elf [topology] file = topology.elf +# 3 CPUs on socket 0 with different CPU TLE (standard, dedicated, origin) +# 1 CPU on socket 2 +extra_params = -smp 1,drawers=3,books=3,sockets=4,cores=4,maxcpus=144 -cpu z14,ctop=on -device z14-s390x-cpu,core-id=1,entitlement=low -device z14-s390x-cpu,core-id=2,dedicated=on -device z14-s390x-cpu,core-id=10 -device z14-s390x-cpu,core-id=20 -device z14-s390x-cpu,core-id=130,socket-id=0,book-id=0,drawer-id=0 -append '-drawers 3 -books 3 -sockets 4 -cores 4' + +[topology-2] +file = topology.elf +extra_params = -smp 1,drawers=2,books=2,sockets=2,cores=30,maxcpus=240 -append '-drawers 2 -books 2 -sockets 2 -cores 30' -cpu z14,ctop=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=2,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=3,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=4,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=5,entitlement=high,dedicated=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=65,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=66,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=67,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=68,entitlement=high,dedicated=on + +[topology-3] +file = topology.elf +extra_params = -smp drawers=2,books=2,sockets=31,cores=2,maxcpus=248 -append '-drawers 2 -books 2 -sockets 31 -cores 2'
Signature · 1 line
2.31.1
Re: [kvm-unit-tests PATCH v9 2/2] s390x: topology: Checking Configuration Topology Information
Quoted 17 lines · Pierre Morel
STSI with function code 15 is used to store the CPU configuration topology.
We retrieve the maximum nested level with SCLP and use the topology tree provided by the drawers, books, sockets, cores arguments.
We check :
- if the topology stored is coherent between the QEMU -smp parameters and kernel parameters.
- the number of CPUs
- the maximum number of CPUs
- the number of containers of each levels for every STSI(15.1.x) instruction allowed by the machine.[topology]
file = topology.elf
s390x/unittests.cfg file = ex.elf · line 230
Quoted 7 lines
s390x/unittests.cfg +7
-0+# 3 CPUs on socket 0 with different CPU TLE (standard, dedicated, origin) +# 1 CPU on socket 2 +extra_params = -smp 1,drawers=3,books=3,sockets=4,cores=4,maxcpus=144 -cpu z14,ctop=on -device z14-s390x-cpu,core-id=1,entitlement=low -device z14-s390x-cpu,core-id=2,dedicated=on -device z14-s390x-cpu,core-id=10 -device z14-s390x-cpu,core-id=20 -device z14-s390x-cpu,core-id=130,socket-id=0,book-id=0,drawer-id=0 -append '-drawers 3 -books 3 -sockets 4 -cores 4' + +[topology-2] +file = topology.elf +extra_params = -smp 1,drawers=2,books=2,sockets=2,cores=30,maxcpus=240 -append '-drawers 2 -books 2 -sockets 2 -cores 30' -cpu z14,ctop=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=2,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=3,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=4,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=5,entitlement=high,dedicated=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=65,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=66,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=67,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=68,entitlement=high,dedicated=on
Pardon my ignorance but I see z14 in there, will this work if we run on a z13?
Also, will this work/fail gracefully if the test is run with a quemu that doesn't know about topology or will it crash?
Re: [kvm-unit-tests PATCH v9 2/2] s390x: topology: Checking Configuration Topology Information
Quoted 40 lines · Janosch Frank
Quoted 39 lines · Pierre Morel
STSI with function code 15 is used to store the CPU configuration topology.
We retrieve the maximum nested level with SCLP and use the topology tree provided by the drawers, books, sockets, cores arguments.
We check :
- if the topology stored is coherent between the QEMU -smp parameters and kernel parameters.
- the number of CPUs
- the maximum number of CPUs
- the number of containers of each levels for every STSI(15.1.x) instruction allowed by the machine.[topology]
file = topology.elf
+# 3 CPUs on socket 0 with different CPU TLE (standard, dedicated, origin)(quoted diff) +2
-0+# 1 CPU on socket 2 +extra_params = -smp1,drawers=3,books=3,sockets=4,cores=4,maxcpus=144 -cpu z14,ctop=on
-device z14-s390x-cpu,core-id=1,entitlement=low -device z14-s390x-cpu,core-id=2,dedicated=on -device z14-s390x-cpu,core-id=10
-device z14-s390x-cpu,core-id=20 -device z14-s390x-cpu,core-id=130,socket-id=0,book-id=0,drawer-id=0 -append '-drawers 3 -books 3 -sockets 4 -cores 4's390x/unittests.cfg +4
-0+ +[topology-2] +file = topology.elf +extra_params = -smp1,drawers=2,books=2,sockets=2,cores=30,maxcpus=240 -append '-drawers 2 -books 2 -sockets 2 -cores 30' -cpu z14,ctop=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=2,entitlement=low -device
z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=3,entitlement=medium
-device
z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=4,entitlement=high
-device
z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=5,entitlement=high,dedicated=on
-device
z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=65,entitlement=low
Quoted 8 lines
Quoted 6 lines
-device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=66,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=67,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=68,entitlement=high,dedicated=on
Pardon my ignorance but I see z14 in there, will this work if we run on a z13?
I think it will, we do not use anything specific to the CPU but the Configuration topology facility which start with z10EC and AFAIU QEMU will accept a processor newer than the one of the host, at least it does on my LPAR (VM z16b > host z16a)
But we can use z13 as basis, which also covers the case where I forgot something.
Quoted 2 lines
Also, will this work/fail gracefully if the test is run with a quemu that doesn't know about topology or will it crash?
It will crash, QEMU will refuse the drawers and book parameters if the QEMU patch for topology has not been applied.
So, I should first propose a simple unittests.cfg working with both, which will SKIP with "Topology facility not present" without the patch.
When the patch is becoming used we can add more testings.
Thanks for the comments.
Pierre
Re: [kvm-unit-tests PATCH v9 2/2] s390x: topology: Checking Configuration Topology Information
Quoted 55 lines · Pierre Morel
Quoted 44 lines · Janosch Frank
Quoted 43 lines · Pierre Morel
STSI with function code 15 is used to store the CPU configuration topology.
We retrieve the maximum nested level with SCLP and use the topology tree provided by the drawers, books, sockets, cores arguments.
We check :
- if the topology stored is coherent between the QEMU -smp parameters and kernel parameters.
- the number of CPUs
- the maximum number of CPUs
- the number of containers of each levels for every STSI(15.1.x) instruction allowed by the machine.[topology]
file = topology.elf
+# 3 CPUs on socket 0 with different CPU TLE (standard, dedicated, origin)(quoted diff) +2
-0+# 1 CPU on socket 2 +extra_params = -smp1,drawers=3,books=3,sockets=4,cores=4,maxcpus=144 -cpu z14,ctop=on -device z14-s390x-cpu,core-id=1,entitlement=low -device z14-s390x-cpu,core-id=2,dedicated=on -device z14-s390x-cpu,core-id=10 -device z14-s390x-cpu,core-id=20 -device z14-s390x-cpu,core-id=130,socket-id=0,book-id=0,drawer-id=0 -append '-drawers 3 -books 3 -sockets 4 -cores 4'
s390x/unittests.cfg +4
-0+ +[topology-2] +file = topology.elf +extra_params = -smp1,drawers=2,books=2,sockets=2,cores=30,maxcpus=240 -append '-drawers
2 -books 2 -sockets 2 -cores 30' -cpu z14,ctop=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=2,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=3,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=4,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=5,entitlement=high,dedicated=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=65,entitlement=low -deviceQuoted 8 lines
Quoted 5 lines
z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=66,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=67,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=68,entitlement=high,dedicated=on
Pardon my ignorance but I see z14 in there, will this work if we run on a z13?
Quoted 7 lines
I think it will, we do not use anything specific to the CPU but the Configuration topology facility which start with z10EC
and AFAIU QEMU will accept a processor newer than the one of the host, at least it does on my LPAR (VM z16b > host z16a)But we can use z13 as basis, which also covers the case where I forgot something.
I don't really care what we use as a base.
But we should avoid a "FAIL" if the tests are run on a machine that's older than what's specified here.
Quoted 6 lines
Quoted 5 lines
Also, will this work/fail gracefully if the test is run with a quemu that doesn't know about topology or will it crash?
Quoted 8 lines
It will crash, QEMU will refuse the drawers and book parameters if the QEMU patch for topology has not been applied.
So, I should first propose a simple unittests.cfg working with both, which will SKIP with "Topology facility not present" without the patch.
When the patch is becoming used we can add more testings.
As stated above, the test shouldn't fail if the QEMU code is missing.
If there's no convenient way to do feature checking for this, then we can put those tests into a special group and make sure that this group is run in the CI once the QEMU code is upstream.
Re: [kvm-unit-tests PATCH v9 2/2] s390x: topology: Checking Configuration Topology Information
In reply to Janosch FrankQuoting Janosch Frank (2023-06-01 11:38:37)
[...]
Quoted 4 lines
Quoted 4 lines
[topology]
file = topology.elfs390x/unittests.cfg +2
-0+# 3 CPUs on socket 0 with different CPU TLE (standard, dedicated, origin) +# 1 CPU on socket 2
Quoted 8 lines
s390x/unittests.cfg file = ex.elf · line 230
Quoted 5 lines
s390x/unittests.cfg +5
-0+extra_params = -smp 1,drawers=3,books=3,sockets=4,cores=4,maxcpus=144 -cpu z14,ctop=on -device z14-s390x-cpu,core-id=1,entitlement=low -device z14-s390x-cpu,core-id=2,dedicated=on -device z14-s390x-cpu,core-id=10 -device z14-s390x-cpu,core-id=20 -device z14-s390x-cpu,core-id=130,socket-id=0,book-id=0,drawer-id=0 -append '-drawers 3 -books 3 -sockets 4 -cores 4' + +[topology-2] +file = topology.elf +extra_params = -smp 1,drawers=2,books=2,sockets=2,cores=30,maxcpus=240 -append '-drawers 2 -books 2 -sockets 2 -cores 30' -cpu z14,ctop=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=2,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=3,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=4,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=5,entitlement=high,dedicated=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=65,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=66,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=67,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=68,entitlement=high,dedicated=onPardon my ignorance but I see z14 in there, will this work if we run on a z13?
It causes a skip, I reproduced this on a z14 by changing to z15:
SKIP topology (qemu-system-s390x: unable to find CPU model 'z15')
If we can make this more generic so the tests run on older machines it would be good, but if we can't it wouldn't break (i.e. FAIL) on older machines.
Quoted 2 lines
Also, will this work/fail gracefully if the test is run with a quemu that doesn't know about topology or will it crash?
Just tried on my box, skips with:
SKIP topology (qemu-system-s390x: Parameter 'smp.books' is unexpected)
So I think we're good here.
Re: [kvm-unit-tests PATCH v9 2/2] s390x: topology: Checking Configuration Topology Information
Quoted 21 lines · Nico Boehr
Quoting Janosch Frank (2023-06-01 11:38:37)
[...]Quoted 4 lines
Quoted 4 lines
[topology]
file = topology.elfs390x/unittests.cfg +2
-0+# 3 CPUs on socket 0 with different CPU TLE (standard, dedicated, origin) +# 1 CPU on socket 2Quoted 8 lines
s390x/unittests.cfg file = ex.elf · line 230
Quoted 5 lines
s390x/unittests.cfg +5
-0+extra_params = -smp 1,drawers=3,books=3,sockets=4,cores=4,maxcpus=144 -cpu z14,ctop=on -device z14-s390x-cpu,core-id=1,entitlement=low -device z14-s390x-cpu,core-id=2,dedicated=on -device z14-s390x-cpu,core-id=10 -device z14-s390x-cpu,core-id=20 -device z14-s390x-cpu,core-id=130,socket-id=0,book-id=0,drawer-id=0 -append '-drawers 3 -books 3 -sockets 4 -cores 4' + +[topology-2] +file = topology.elf +extra_params = -smp 1,drawers=2,books=2,sockets=2,cores=30,maxcpus=240 -append '-drawers 2 -books 2 -sockets 2 -cores 30' -cpu z14,ctop=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=2,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=3,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=4,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=5,entitlement=high,dedicated=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=65,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=66,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=67,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=68,entitlement=high,dedicated=onPardon my ignorance but I see z14 in there, will this work if we run on a z13?
It causes a skip, I reproduced this on a z14 by changing to z15:
SKIP topology (qemu-system-s390x: unable to find CPU model 'z15')If we can make this more generic so the tests run on older machines it would be good, but if we can't it wouldn't break (i.e. FAIL) on older machines.
Quoted 7 lines
Quoted 2 lines
Also, will this work/fail gracefully if the test is run with a quemu that doesn't know about topology or will it crash?
Just tried on my box, skips with:
SKIP topology (qemu-system-s390x: Parameter 'smp.books' is unexpected)So I think we're good here.
Perfect, thanks for checking!
Re: [kvm-unit-tests PATCH v9 2/2] s390x: topology: Checking Configuration Topology Information
In reply to Nico BoehrQuoted 15 lines · Nico Boehr
Quoting Janosch Frank (2023-06-01 11:38:37)
[...]Quoted 4 lines
Quoted 4 lines
[topology]
file = topology.elfs390x/unittests.cfg +2
-0+# 3 CPUs on socket 0 with different CPU TLE (standard, dedicated, origin) +# 1 CPU on socket 2Quoted 8 lines
s390x/unittests.cfg file = ex.elf · line 230
Quoted 5 lines
s390x/unittests.cfg +5
-0+extra_params = -smp 1,drawers=3,books=3,sockets=4,cores=4,maxcpus=144 -cpu z14,ctop=on -device z14-s390x-cpu,core-id=1,entitlement=low -device z14-s390x-cpu,core-id=2,dedicated=on -device z14-s390x-cpu,core-id=10 -device z14-s390x-cpu,core-id=20 -device z14-s390x-cpu,core-id=130,socket-id=0,book-id=0,drawer-id=0 -append '-drawers 3 -books 3 -sockets 4 -cores 4' + +[topology-2] +file = topology.elf +extra_params = -smp 1,drawers=2,books=2,sockets=2,cores=30,maxcpus=240 -append '-drawers 2 -books 2 -sockets 2 -cores 30' -cpu z14,ctop=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=2,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=3,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=4,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=5,entitlement=high,dedicated=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=65,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=66,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=67,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=68,entitlement=high,dedicated=onPardon my ignorance but I see z14 in there, will this work if we run on a z13?
Quoted 5 lines
It causes a skip, I reproduced this on a z14 by changing to z15:
SKIP topology (qemu-system-s390x: unable to find CPU model 'z15')If we can make this more generic so the tests run on older machines it would be good, but if we can't it wouldn't break (i.e. FAIL) on older machines.
Can't we simply use "-cpu max,ctop=on" ?
Thomas
Re: [kvm-unit-tests PATCH v9 2/2] s390x: topology: Checking Configuration Topology Information
Quoted 38 lines · Thomas Huth
Quoted 37 lines · Nico Boehr
Quoting Janosch Frank (2023-06-01 11:38:37)
[...]Quoted 23 lines
Quoted 23 lines
[topology]
file = topology.elf
+# 3 CPUs on socket 0 with different CPU TLE (standard, dedicated, origin)(quoted diff) +2
-0+# 1 CPU on socket 2 +extra_params = -smp1,drawers=3,books=3,sockets=4,cores=4,maxcpus=144 -cpu z14,ctop=on
-device z14-s390x-cpu,core-id=1,entitlement=low -device
z14-s390x-cpu,core-id=2,dedicated=on -device z14-s390x-cpu,core-id=10 -device z14-s390x-cpu,core-id=20 -device z14-s390x-cpu,core-id=130,socket-id=0,book-id=0,drawer-id=0 -append '-drawers 3 -books 3 -sockets 4 -cores 4's390x/unittests.cfg +4
-0+ +[topology-2] +file = topology.elf +extra_params = -smp1,drawers=2,books=2,sockets=2,cores=30,maxcpus=240 -append '-drawers 2 -books 2 -sockets 2 -cores 30' -cpu z14,ctop=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=2,entitlement=low -device
z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=3,entitlement=medium
-device
z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=4,entitlement=high
-device
z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=5,entitlement=high,dedicated=on
-device
z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=65,entitlement=low
-deviceQuoted 8 lines
Quoted 5 lines
z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=66,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=67,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=68,entitlement=high,dedicated=on
Pardon my ignorance but I see z14 in there, will this work if we run on a z13?
It causes a skip, I reproduced this on a z14 by changing to z15:
SKIP topology (qemu-system-s390x: unable to find CPU model 'z15')
Quoted 7 lines
Quoted 2 lines
If we can make this more generic so the tests run on older machines it would be good, but if we can't it wouldn't break (i.e. FAIL) on older machines.
Can't we simply use "-cpu max,ctop=on" ?
Thomas
Yes we can thanks.
Pierre
Re: [kvm-unit-tests PATCH v9 2/2] s390x: topology: Checking Configuration Topology Information
In reply to Nico BoehrQuoted 19 lines · Nico Boehr
Quoting Janosch Frank (2023-06-01 11:38:37)
[...]Quoted 11 lines
s390x/unittests.cfg file = ex.elf · line 230
Quoted 9 lines
[topology]
file = topology.elfs390x/unittests.cfg +7
-0+# 3 CPUs on socket 0 with different CPU TLE (standard, dedicated, origin) +# 1 CPU on socket 2 +extra_params = -smp 1,drawers=3,books=3,sockets=4,cores=4,maxcpus=144 -cpu z14,ctop=on -device z14-s390x-cpu,core-id=1,entitlement=low -device z14-s390x-cpu,core-id=2,dedicated=on -device z14-s390x-cpu,core-id=10 -device z14-s390x-cpu,core-id=20 -device z14-s390x-cpu,core-id=130,socket-id=0,book-id=0,drawer-id=0 -append '-drawers 3 -books 3 -sockets 4 -cores 4' + +[topology-2] +file = topology.elf +extra_params = -smp 1,drawers=2,books=2,sockets=2,cores=30,maxcpus=240 -append '-drawers 2 -books 2 -sockets 2 -cores 30' -cpu z14,ctop=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=2,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=3,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=4,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=5,entitlement=high,dedicated=on -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=65,entitlement=low -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=66,entitlement=medium -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=67,entitlement=high -device z14-s390x-cpu,drawer-id=1,book-id=0,socket-id=0,core-id=68,entitlement=high,dedicated=onPardon my ignorance but I see z14 in there, will this work if we run on a z13?
It causes a skip, I reproduced this on a z14 by changing to z15:
SKIP topology (qemu-system-s390x: unable to find CPU model 'z15')If we can make this more generic so the tests run on older machines it would be good, but if we can't it wouldn't break (i.e. FAIL) on older machines.
Quoted 6 lines
Quoted 2 lines
Also, will this work/fail gracefully if the test is run with a quemu that doesn't know about topology or will it crash?
Just tried on my box, skips with:
SKIP topology (qemu-system-s390x: Parameter 'smp.books' is unexpected)So I think we're good here.
Right, I answered about QEMU and not for kvm-unit-tests