On 6/1/23 19:41, Pierre Morel wrote:
On 6/1/23 11:38, Janosch Frank wrote:On 5/19/23 13:22, Pierre Morel wrote: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) +# 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?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.
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.
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.