Re: [PATCH v21 03/20] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-07-26 Thread Pierre Morel
On 7/25/23 17:41, Nina Schoetterl-Glausch wrote: On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- MAINTAINERS

Re: [PATCH v21 01/20] s390x/cpu topology: add s390 specifics to CPU topology

2023-07-25 Thread Pierre Morel
On 7/24/23 12:15, Nina Schoetterl-Glausch wrote: On Fri, 2023-07-21 at 13:24 +0200, Pierre Morel wrote: On 7/18/23 18:31, Nina Schoetterl-Glausch wrote: Reviewed-by: Nina Schoetterl-Glausch Some notes below. The s390x/ prefix in the title might suggest that this patch is s390 specific

Re: [PATCH v21 02/20] s390x/cpu topology: add topology entries on CPU hotplug

2023-07-25 Thread Pierre Morel
On 7/24/23 22:19, Nina Schoetterl-Glausch wrote: On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers,   books

Re: [PATCH v21 01/20] s390x/cpu topology: add s390 specifics to CPU topology

2023-07-21 Thread Pierre Morel
number 2. The first idea was to separate the patch to ease the review but the functionality introduced in patch 1 do only make sense with patch 2. So I would be for squashing the first two patches. ? On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: S390 adds two new SMP levels, drawers

Re: [PATCH v21 16/20] tests/avocado: s390x cpu topology entitlement tests

2023-07-19 Thread Pierre Morel
On 7/19/23 16:13, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-19 at 16:08 +0200, Pierre Morel wrote: On 7/14/23 18:30, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-12 at 22:11 +0200, Thomas Huth wrote: On 12/07/2023 21.37, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-05 at 12:22

Re: [PATCH v21 00/20] s390x: CPU Topology

2023-07-19 Thread Pierre Morel
On 7/5/23 12:02, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: ... Testing === To use the QEMU patches, you will need Linux V6-rc1 or newer, or use the following Linux mainline patches: f5ecfee94493 2022-07-20 KVM: s390: resetting the Topology-Change-Report 24fe0195bc19

Re: [PATCH v21 20/20] tests/avocado: s390x cpu topology bad move

2023-07-19 Thread Pierre Morel
On 7/5/23 12:32, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: This test verifies that QEMU refuses to move a CPU to an unexistant location. s/unexistant/nonexistent/ ? Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 25 +   1 file

Re: [PATCH v21 19/20] tests/avocado: s390x cpu topology dedicated errors

2023-07-19 Thread Pierre Morel
On 7/5/23 12:28, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: Let's test that QEMU refuses to setup a dedicated CPU with low or medium entitlement. Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 48 ++   1 file changed, 48

Re: [PATCH v21 18/20] tests/avocado: s390x cpu topology test socket full

2023-07-19 Thread Pierre Morel
On 7/5/23 12:26, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: This test verifies that QMP set-cpu-topology does not accept to overload a socket. Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 25 +   1 file changed, 25 insertions

Re: [PATCH v21 16/20] tests/avocado: s390x cpu topology entitlement tests

2023-07-19 Thread Pierre Morel
On 7/14/23 18:30, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-12 at 22:11 +0200, Thomas Huth wrote: On 12/07/2023 21.37, Nina Schoetterl-Glausch wrote: On Wed, 2023-07-05 at 12:22 +0200, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: This test takes care to check

Re: [PATCH v21 17/20] tests/avocado: s390x cpu topology test dedicated CPU

2023-07-19 Thread Pierre Morel
Same as for the previous test. I rewrite this to check the guest view. On 6/30/23 11:17, Pierre Morel wrote: A dedicated CPU in vertical polarization can only have a high entitlement. Let's check this. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 28

Re: [PATCH v21 15/20] tests/avocado: s390x cpu topology polarisation

2023-07-19 Thread Pierre Morel
On 7/5/23 10:53, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: Polarization is changed on a request from the guest. Let's verify the polarization is accordingly set by QEMU. Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 46

Re: [PATCH v21 14/20] tests/avocado: s390x cpu topology core

2023-07-19 Thread Pierre Morel
On 7/12/23 22:00, Nina Schoetterl-Glausch wrote: On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: Introduction of the s390x cpu topology core functions and basic tests. We test the corelation between the command line and corRelation the QMP results in query-cpus-fast for various CPU

Re: [PATCH v21 14/20] tests/avocado: s390x cpu topology core

2023-07-19 Thread Pierre Morel
On 7/4/23 15:14, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: Introduction of the s390x cpu topology core functions and basic tests. We test the corelation between the command line and the QMP results in query-cpus-fast for various CPU topology. Signed-off-by: Pierre Morel

Re: [PATCH v21 11/20] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event

2023-07-18 Thread Pierre Morel
On 7/18/23 09:59, Nina Schoetterl-Glausch wrote: On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: When the guest asks to change the polarization this change is forwarded to the upper layer using QAPI. The upper layer is supposed to take according decisions concerning CPU provisioning

Re: [PATCH v21 08/20] qapi/s390x/cpu topology: set-cpu-topology qmp command

2023-07-18 Thread Pierre Morel
On 7/18/23 09:54, Nina Schoetterl-Glausch wrote: On Fri, 2023-06-30 at 11:17 +0200, Pierre Morel wrote: The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor

Re: [PATCH v21 13/20] docs/s390x/cpu topology: document s390x cpu topology

2023-07-12 Thread Pierre Morel
On 7/5/23 10:41, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel ---   MAINTAINERS    |   2 +   docs/devel/index-internals.rst |   1 +   docs/devel/s390-cpu

Re: [PATCH v21 12/20] qapi/s390x/cpu topology: query-cpu-polarization qmp command

2023-07-12 Thread Pierre Morel
On 7/5/23 09:58, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: The query-cpu-polarization qmp command returns the current CPU polarization of the machine. Signed-off-by: Pierre Morel ---   qapi/machine-target.json | 29 +   hw/s390x/cpu-topology.c

Re: [PATCH v21 11/20] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event

2023-07-12 Thread Pierre Morel
On 7/4/23 15:04, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: When the guest asks to change the polarization this change is forwarded to the upper layer using QAPI. The upper layer is supposed to take according decisions concerning CPU provisioning. Signed-off-by: Pierre Morel

Re: [PATCH v21 10/20] machine: adding s390 topology to info hotpluggable-cpus

2023-07-12 Thread Pierre Morel
On 7/4/23 14:59, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: S390 topology adds books and drawers topology containers. Let's add these to the HMP information for hotpluggable cpus. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch ---   hw/core/machine-hmp

Re: [PATCH v21 09/20] machine: adding s390 topology to query-cpu-fast

2023-07-12 Thread Pierre Morel
On 7/4/23 14:55, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: S390x provides two more topology attributes, entitlement and dedication. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel ---   qapi/machine.json  | 9

Re: [PATCH v21 08/20] qapi/s390x/cpu topology: set-cpu-topology qmp command

2023-07-12 Thread Pierre Morel
On 7/4/23 14:53, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor previously moved the CPU

Re: [PATCH v21 06/20] s390x/cpu topology: interception of PTF instruction

2023-07-12 Thread Pierre Morel
On 7/4/23 14:16, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervisor activates the interpretation by using

Re: [PATCH v21 03/20] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-07-12 Thread Pierre Morel
On 7/4/23 13:40, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- ... diff --git a/target/s390x/cpu.h b/target/s390x

Re: [PATCH v21 02/20] s390x/cpu topology: add topology entries on CPU hotplug

2023-07-12 Thread Pierre Morel
On 7/4/23 12:32, Thomas Huth wrote: On 30/06/2023 11.17, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers,    books and sockets in the case

[PATCH v21 06/20] s390x/cpu topology: interception of PTF instruction

2023-06-30 Thread Pierre Morel
are intercepted and must be emulated by the userland hypervisor. During RESET all CPU of the configuration are placed in horizontal polarity. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch --- include/hw/s390x/s390-virtio-ccw.h | 6 hw/s390x/cpu-topology.c| 54

[PATCH v21 07/20] target/s390x/cpu topology: activate CPU topology

2023-06-30 Thread Pierre Morel
execution). Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- hw/s390x/cpu-topology.c | 2 +- target/s390x/cpu_models.c | 1 + target/s390x/kvm/kvm.c| 9 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/s390x/cpu-topology.c b/hw/s390x/cpu-topology.c index

[PATCH v21 08/20] qapi/s390x/cpu topology: set-cpu-topology qmp command

2023-06-30 Thread Pierre Morel
entitlement and the dedicated attribute to notify the guest if the host admin modified scheduling or dedication of a vCPU. With this knowledge the guest has the possibility to optimize the usage of the vCPUs. The command has a feature unstable for the moment. Signed-off-by: Pierre Morel

[PATCH v21 19/20] tests/avocado: s390x cpu topology dedicated errors

2023-06-30 Thread Pierre Morel
Let's test that QEMU refuses to setup a dedicated CPU with low or medium entitlement. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 48 ++ 1 file changed, 48 insertions(+) diff --git a/tests/avocado/s390_topology.py b/tests/avocado

[PATCH v21 10/20] machine: adding s390 topology to info hotpluggable-cpus

2023-06-30 Thread Pierre Morel
S390 topology adds books and drawers topology containers. Let's add these to the HMP information for hotpluggable cpus. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch --- hw/core/machine-hmp-cmds.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/core/machine-hmp

[PATCH v21 05/20] s390x/cpu topology: resetting the Topology-Change-Report

2023-06-30 Thread Pierre Morel
During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- include/hw/s390x/cpu-topology.h | 1

[PATCH v21 15/20] tests/avocado: s390x cpu topology polarisation

2023-06-30 Thread Pierre Morel
Polarization is changed on a request from the guest. Let's verify the polarization is accordingly set by QEMU. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 46 ++ 1 file changed, 46 insertions(+) diff --git a/tests/avocado/s390_topology.py b

[PATCH v21 09/20] machine: adding s390 topology to query-cpu-fast

2023-06-30 Thread Pierre Morel
S390x provides two more topology attributes, entitlement and dedication. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel --- qapi/machine.json | 9 - target/s390x/cpu.c | 4 2 files changed, 12 insertions(+), 1 deletion(-) diff

[PATCH v21 20/20] tests/avocado: s390x cpu topology bad move

2023-06-30 Thread Pierre Morel
This test verifies that QEMU refuses to move a CPU to an unexistant location. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/avocado/s390_topology.py b/tests/avocado/s390_topology.py index

[PATCH v21 14/20] tests/avocado: s390x cpu topology core

2023-06-30 Thread Pierre Morel
Introduction of the s390x cpu topology core functions and basic tests. We test the corelation between the command line and the QMP results in query-cpus-fast for various CPU topology. Signed-off-by: Pierre Morel --- MAINTAINERS| 1 + tests/avocado/s390_topology.py | 196

[PATCH v21 03/20] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-06-30 Thread Pierre Morel
On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- MAINTAINERS | 1 + qapi/machine-target.json | 14 ++ include/hw/s390x/cpu-topology.h | 25 +++ include

[PATCH v21 13/20] docs/s390x/cpu topology: document s390x cpu topology

2023-06-30 Thread Pierre Morel
Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- MAINTAINERS| 2 + docs/devel/index-internals.rst | 1 + docs/devel/s390-cpu-topology.rst | 170 docs/system/s390x/cpu-topology.rst | 240

[PATCH v21 18/20] tests/avocado: s390x cpu topology test socket full

2023-06-30 Thread Pierre Morel
This test verifies that QMP set-cpu-topology does not accept to overload a socket. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/avocado/s390_topology.py b/tests/avocado/s390_topology.py index

[PATCH v21 16/20] tests/avocado: s390x cpu topology entitlement tests

2023-06-30 Thread Pierre Morel
This test takes care to check the changes on different entitlements when the guest requests a polarization change. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 47 ++ 1 file changed, 47 insertions(+) diff --git a/tests/avocado

[PATCH v21 12/20] qapi/s390x/cpu topology: query-cpu-polarization qmp command

2023-06-30 Thread Pierre Morel
The query-cpu-polarization qmp command returns the current CPU polarization of the machine. Signed-off-by: Pierre Morel --- qapi/machine-target.json | 29 + hw/s390x/cpu-topology.c | 8 2 files changed, 37 insertions(+) diff --git a/qapi/machine

[PATCH v21 17/20] tests/avocado: s390x cpu topology test dedicated CPU

2023-06-30 Thread Pierre Morel
A dedicated CPU in vertical polarization can only have a high entitlement. Let's check this. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 28 1 file changed, 28 insertions(+) diff --git a/tests/avocado/s390_topology.py b/tests/avocado

[PATCH v21 11/20] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event

2023-06-30 Thread Pierre Morel
When the guest asks to change the polarization this change is forwarded to the upper layer using QAPI. The upper layer is supposed to take according decisions concerning CPU provisioning. Signed-off-by: Pierre Morel --- qapi/machine-target.json | 33 + hw/s390x

[PATCH v21 04/20] s390x/sclp: reporting the maximum nested topology entries

2023-06-30 Thread Pierre Morel
The maximum nested topology entries is used by the guest to know how many nested topology are available on the machine. Let change the MNEST value from 2 to 4 in the SCLP READ INFO structure now that we support books and drawers. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch

[PATCH v21 02/20] s390x/cpu topology: add topology entries on CPU hotplug

2023-06-30 Thread Pierre Morel
topology based on its core ID and it gets defaults values for the modifier attributes. This way, starting QEMU without specifying the topology can still get some advantage of the CPU topology. Signed-off-by: Pierre Morel --- MAINTAINERS | 6 + include/hw/s390x/cpu-topology.h

[PATCH v21 00/20] s390x: CPU Topology

2023-06-30 Thread Pierre Morel
his series. The admin will want to match the host and the guest topology, taking into account that the guest does not recognize multithreading. Consequently, two vCPU assigned to threads of the same real CPU should preferably be assigned to the same socket of the guest machine. Regards, Pierre Pierre

[PATCH v21 01/20] s390x/cpu topology: add s390 specifics to CPU topology

2023-06-30 Thread Pierre Morel
us provide the SMP properties with books and drawers levels and S390 CPU with dedication and entitlement, Signed-off-by: Pierre Morel --- qapi/machine-common.json| 22 + qapi/machine.json | 21 ++--- include/hw/boards.h | 10

Re: [PATCH v20 16/21] tests/avocado: s390x cpu topology entitlement tests

2023-06-27 Thread Pierre Morel
On 5/22/23 21:47, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: This test takes care to check the changes on different entitlements when the guest requests a polarization change. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 56

Re: [PATCH v20 15/21] tests/avocado: s390x cpu topology polarisation

2023-06-27 Thread Pierre Morel
On 5/22/23 21:45, Nina Schoetterl-Glausch wrote: Try to be consistent in the spelling of polarization. You use an s in the title and in the test name below. On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: Polarization is changed on a request from the guest. Let's verify

Re: [PATCH v20 14/21] tests/avocado: s390x cpu topology core

2023-06-27 Thread Pierre Morel
On 5/22/23 21:38, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: Introduction of the s390x cpu topology core functions and basic tests. We test the corelation between the command line and the QMP results in query-cpus-fast for various CPU topology

Re: [PATCH v20 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-06-21 Thread Pierre Morel
On 5/3/23 12:23, Cédric Le Goater wrote: Hello, On 5/3/23 11:12, Thomas Huth wrote: On 28/04/2023 14.35, Pierre Morel wrote: On 4/27/23 15:38, Thomas Huth wrote: On 25/04/2023 18.14, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU

Re: [PATCH v20 09/21] machine: adding s390 topology to query-cpu-fast

2023-06-21 Thread Pierre Morel
On 6/12/23 09:55, Cédric Le Goater wrote: Hello Pierre, On 4/25/23 18:14, Pierre Morel wrote: S390x provides two more topology attributes, entitlement and dedication. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel Reviewed-by: Nina

Re: [PATCH v20 12/21] qapi/s390x/cpu topology: query-cpu-polarization qmp command

2023-05-12 Thread Pierre Morel
On 5/10/23 14:04, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: The query-cpu-polarization qmp command returns the current CPU polarization of the machine. Signed-off-by: Pierre Morel --- qapi/machine-target.json | 30

Re: [PATCH v20 11/21] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event

2023-05-09 Thread Pierre Morel
On 5/8/23 23:47, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: When the guest asks to change the polarization this change is forwarded to the upper layer using QAPI. The upper layer is supposed to take according decisions concerning CPU provisioning

Re: [PATCH v20 08/21] qapi/s390x/cpu topology: set-cpu-topology qmp command

2023-05-09 Thread Pierre Morel
On 5/8/23 21:42, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor

Re: [PATCH v20 10/21] machine: adding s390 topology to info hotpluggable-cpus

2023-05-09 Thread Pierre Morel
On 5/8/23 21:49, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: S390 topology adds books and drawers topology containers. Let's add these to the HMP information for hotpluggable cpus. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch

Re: [PATCH v20 06/21] s390x/cpu topology: interception of PTF instruction

2023-05-05 Thread Pierre Morel
On 5/4/23 13:03, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervisor activates the interpretation

Re: [PATCH v20 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-05-03 Thread Pierre Morel
On 4/27/23 10:04, Thomas Huth wrote: On 25/04/2023 18.14, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific topology features like dedication and entitlement to give to the guest indications on the host vCPUs scheduling

Re: [PATCH v20 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-05-03 Thread Pierre Morel
On 4/27/23 10:04, Thomas Huth wrote: On 25/04/2023 18.14, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific topology features like dedication and entitlement to give to the guest indications on the host vCPUs scheduling

Re: [PATCH v20 03/21] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-05-03 Thread Pierre Morel
On 5/2/23 19:22, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 18:14 +0200, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- MAINTAINERS

Re: [PATCH v20 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-05-03 Thread Pierre Morel
On 5/2/23 14:30, Cédric Le Goater wrote: On 4/25/23 18:14, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. [...] + +/** + * s390_topology_init: + * @ms: the machine state where the machine topology is defined

Re: [PATCH v20 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-05-03 Thread Pierre Morel
On 5/2/23 15:48, Cédric Le Goater wrote: On 5/2/23 14:05, Cédric Le Goater wrote: On 4/25/23 18:14, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific topology features like dedication and entitlement to give to the guest

Re: [PATCH v20 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-04-28 Thread Pierre Morel
On 4/27/23 15:38, Thomas Huth wrote: On 25/04/2023 18.14, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers,    books and sockets in the case

Re: [PATCH v20 03/21] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-04-28 Thread Pierre Morel
On 4/27/23 19:01, Thomas Huth wrote: On 25/04/2023 18.14, Pierre Morel wrote: On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel ---   MAINTAINERS |   1 +   include/hw

Re: [PATCH v20 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-04-28 Thread Pierre Morel
On 4/27/23 10:04, Thomas Huth wrote: On 25/04/2023 18.14, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific topology features like dedication and entitlement to give to the guest indications on the host vCPUs scheduling

[PATCH v20 08/21] qapi/s390x/cpu topology: set-cpu-topology qmp command

2023-04-25 Thread Pierre Morel
entitlement and the dedicated attribute to notify the guest if the host admin modified scheduling or dedication of a vCPU. With this knowledge the guest has the possibility to optimize the usage of the vCPUs. The command has a feature unstable for the moment. Signed-off-by: Pierre Morel

[PATCH v20 14/21] tests/avocado: s390x cpu topology core

2023-04-25 Thread Pierre Morel
Introduction of the s390x cpu topology core functions and basic tests. We test the corelation between the command line and the QMP results in query-cpus-fast for various CPU topology. Signed-off-by: Pierre Morel --- MAINTAINERS| 1 + tests/avocado/s390_topology.py | 208

[PATCH v20 00/21] s390x: CPU Topology

2023-04-25 Thread Pierre Morel
st machine. Regards, Pierre Pierre Morel (21): s390x/cpu topology: add s390 specifics to CPU topology s390x/cpu topology: add topology entries on CPU hotplug target/s390x/cpu topology: handle STSI(15) and build the SYSIB s390x/sclp: reporting the maximum nested topology entries s390x/cp

[PATCH v20 12/21] qapi/s390x/cpu topology: query-cpu-polarization qmp command

2023-04-25 Thread Pierre Morel
The query-cpu-polarization qmp command returns the current CPU polarization of the machine. Signed-off-by: Pierre Morel --- qapi/machine-target.json | 30 ++ hw/s390x/cpu-topology.c | 14 ++ 2 files changed, 44 insertions(+) diff --git a/qapi/machine

[PATCH v20 04/21] s390x/sclp: reporting the maximum nested topology entries

2023-04-25 Thread Pierre Morel
The maximum nested topology entries is used by the guest to know how many nested topology are available on the machine. Let change the MNEST value from 2 to 4 in the SCLP READ INFO structure now that we support books and drawers. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch

[PATCH v20 13/21] docs/s390x/cpu topology: document s390x cpu topology

2023-04-25 Thread Pierre Morel
Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- MAINTAINERS| 2 + docs/devel/index-internals.rst | 1 + docs/devel/s390-cpu-topology.rst | 162 +++ docs/system/s390x/cpu-topology.rst | 240

[PATCH v20 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-04-25 Thread Pierre Morel
us provide the SMP properties with books and drawers levels and S390 CPU with dedication and entitlement, Signed-off-by: Pierre Morel --- qapi/machine-common.json| 22 qapi/machine-target.json| 12 +++ qapi/machine.json | 17

[PATCH v20 20/21] tests/avocado: s390x cpu topology bad move

2023-04-25 Thread Pierre Morel
This test verifies that QEMU refuses to move a CPU to an unexistant location. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 25 + 1 file changed, 25 insertions(+) diff --git a/tests/avocado/s390_topology.py b/tests/avocado/s390_topology.py index

[PATCH v20 16/21] tests/avocado: s390x cpu topology entitlement tests

2023-04-25 Thread Pierre Morel
This test takes care to check the changes on different entitlements when the guest requests a polarization change. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 56 ++ 1 file changed, 56 insertions(+) diff --git a/tests/avocado

[PATCH v20 18/21] tests/avocado: s390x cpu topology test socket full

2023-04-25 Thread Pierre Morel
This test verifies that QMP set-cpu-topology does not accept to overload a socket. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tests/avocado/s390_topology.py b/tests/avocado/s390_topology.py

[PATCH v20 15/21] tests/avocado: s390x cpu topology polarisation

2023-04-25 Thread Pierre Morel
Polarization is changed on a request from the guest. Let's verify the polarization is accordingly set by QEMU. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 38 ++ 1 file changed, 38 insertions(+) diff --git a/tests/avocado/s390_topology.py b

[PATCH v20 09/21] machine: adding s390 topology to query-cpu-fast

2023-04-25 Thread Pierre Morel
S390x provides two more topology attributes, entitlement and dedication. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by: Pierre Morel Reviewed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth --- qapi/machine.json | 9 - hw/core/machine

[PATCH v20 05/21] s390x/cpu topology: resetting the Topology-Change-Report

2023-04-25 Thread Pierre Morel
During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- include/hw/s390x/cpu-topology.h | 1

[PATCH v20 21/21] tests/avocado: s390x cpu topology query-cpu-polarization

2023-04-25 Thread Pierre Morel
This test verifies that the qmp query query-cpu-polarization reports correctly the polarization when the guest requests a polarization change. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 33 + 1 file changed, 33 insertions(+) diff --git

[PATCH v20 11/21] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE qapi event

2023-04-25 Thread Pierre Morel
When the guest asks to change the polarization this change is forwarded to the upper layer using QAPI. The upper layer is supposed to take according decisions concerning CPU provisioning. Signed-off-by: Pierre Morel --- qapi/machine-target.json | 33 + hw/s390x

[PATCH v20 03/21] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-04-25 Thread Pierre Morel
On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by: Pierre Morel --- MAINTAINERS | 1 + include/hw/s390x/cpu-topology.h | 24 +++ include/hw/s390x/sclp.h | 1 + target/s390x

[PATCH v20 19/21] tests/avocado: s390x cpu topology dedicated errors

2023-04-25 Thread Pierre Morel
Let's test that QEMU refuses to setup a dedicated CPU with low or medium entitlement. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 51 ++ 1 file changed, 51 insertions(+) diff --git a/tests/avocado/s390_topology.py b/tests/avocado

[PATCH v20 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-04-25 Thread Pierre Morel
topology based on its core ID and it gets defaults values for the modifier attributes. This way, starting QEMU without specifying the topology can still get some advantage of the CPU topology. Signed-off-by: Pierre Morel --- MAINTAINERS | 6 + include/hw/s390x/cpu-topology.h

[PATCH v20 06/21] s390x/cpu topology: interception of PTF instruction

2023-04-25 Thread Pierre Morel
are intercepted and must be emulated by the userland hypervisor. During RESET all CPU of the configuration are placed in horizontal polarity. Signed-off-by: Pierre Morel --- include/hw/s390x/s390-virtio-ccw.h | 6 hw/s390x/cpu-topology.c| 51 ++ target/s390x

[PATCH v20 10/21] machine: adding s390 topology to info hotpluggable-cpus

2023-04-25 Thread Pierre Morel
S390 topology adds books and drawers topology containers. Let's add these to the HMP information for hotpluggable cpus. Signed-off-by: Pierre Morel --- hw/core/machine-hmp-cmds.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c

[PATCH v20 17/21] tests/avocado: s390x cpu topology test dedicated CPU

2023-04-25 Thread Pierre Morel
A dedicated CPU in vertical polarization can only have a high entitlement. Let's check this. Signed-off-by: Pierre Morel --- tests/avocado/s390_topology.py | 34 ++ 1 file changed, 34 insertions(+) diff --git a/tests/avocado/s390_topology.py b/tests/avocado

[PATCH v20 07/21] target/s390x/cpu topology: activate CPU topology

2023-04-25 Thread Pierre Morel
execution). Signed-off-by: Pierre Morel Reviewed-by: Thomas Huth --- hw/s390x/cpu-topology.c | 2 +- target/s390x/cpu_models.c | 1 + target/s390x/kvm/kvm.c| 9 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/s390x/cpu-topology.c b/hw/s390x/cpu-topology.c index

Re: [PATCH v19 14/21] tests/avocado: s390x cpu topology core

2023-04-25 Thread Pierre Morel
On 4/4/23 11:21, Cédric Le Goater wrote: On 4/3/23 18:28, Pierre Morel wrote: Introduction of the s390x cpu topology core functions and basic tests. We test the corelation between the command line and the QMP results in query-cpus-fast for various CPU topology. Signed-off-by: Pierre Morel

Re: [PATCH v19 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-04-25 Thread Pierre Morel
On 4/25/23 11:27, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-25 at 10:45 +0200, Pierre Morel wrote: On 4/24/23 17:32, Nina Schoetterl-Glausch wrote: On Fri, 2023-04-21 at 12:20 +0200, Pierre Morel wrote: On 4/20/23 10:59, Nina Schoetterl-Glausch wrote: On Mon, 2023-04-03 at 18:28 +0200

Re: [PATCH v19 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-04-25 Thread Pierre Morel
On 4/24/23 17:32, Nina Schoetterl-Glausch wrote: On Fri, 2023-04-21 at 12:20 +0200, Pierre Morel wrote: On 4/20/23 10:59, Nina Schoetterl-Glausch wrote: On Mon, 2023-04-03 at 18:28 +0200, Pierre Morel wrote: [..] In the next version with entitlement being an enum it is right. However

Re: [PATCH v19 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-04-21 Thread Pierre Morel
On 4/20/23 10:59, Nina Schoetterl-Glausch wrote: On Mon, 2023-04-03 at 18:28 +0200, Pierre Morel wrote: The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers, books

Re: [PATCH v19 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-04-19 Thread Pierre Morel
On 4/18/23 17:57, Daniel P. Berrangé wrote: On Tue, Apr 04, 2023 at 02:26:05PM +0200, Pierre Morel wrote: On 4/4/23 09:03, Cédric Le Goater wrote: On 4/3/23 18:28, Pierre Morel wrote: diff --git a/include/hw/s390x/cpu-topology.h b/include/hw/s390x/cpu-topology.h new file mode 100644 index

Re: [PATCH v19 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-04-18 Thread Pierre Morel
On 4/18/23 14:38, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-18 at 12:01 +0200, Pierre Morel wrote: On 4/18/23 10:53, Nina Schoetterl-Glausch wrote: On Mon, 2023-04-03 at 18:28 +0200, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU

Re: [PATCH v19 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-04-18 Thread Pierre Morel
On 4/18/23 12:15, Thomas Huth wrote: On 18/04/2023 12.01, Pierre Morel wrote: On 4/18/23 10:53, Nina Schoetterl-Glausch wrote: On Mon, 2023-04-03 at 18:28 +0200, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific topology

Re: [PATCH v19 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-04-18 Thread Pierre Morel
On 4/18/23 10:53, Nina Schoetterl-Glausch wrote: On Mon, 2023-04-03 at 18:28 +0200, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific topology features like dedication and entitlement to give to the guest indications

Re: [PATCH v19 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-04-17 Thread Pierre Morel
On 4/11/23 14:27, Nina Schoetterl-Glausch wrote: On Tue, 2023-04-04 at 16:04 +0200, Pierre Morel wrote: On 4/4/23 14:35, Cédric Le Goater wrote: @@ -0,0 +1,15 @@ +/* + * CPU Topology + * + * Copyright IBM Corp. 2022 Shouldn't we have some range : 2022-2023 ? There was a discussion

Re: [PATCH v19 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-04-04 Thread Pierre Morel
On 4/4/23 14:35, Cédric Le Goater wrote: @@ -0,0 +1,15 @@ +/* + * CPU Topology + * + * Copyright IBM Corp. 2022 Shouldn't we have some range : 2022-2023 ? There was a discussion on this in the first spins, I think to remember that Nina wanted 22 and Thomas 23, now we have a third

Re: [PATCH v19 15/21] tests/avocado: s390x cpu topology polarisation

2023-04-04 Thread Pierre Morel
On 4/4/23 11:22, Cédric Le Goater wrote: On 4/3/23 18:28, Pierre Morel wrote: Polarization is changed on a request from the guest. Let's verify the polarization is accordingly set by QEMU. Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 38

Re: [PATCH v19 01/21] s390x/cpu topology: add s390 specifics to CPU topology

2023-04-04 Thread Pierre Morel
On 4/4/23 09:03, Cédric Le Goater wrote: On 4/3/23 18:28, Pierre Morel wrote: S390 adds two new SMP levels, drawers and books to the CPU topology. The S390 CPU have specific topology features like dedication and entitlement to give to the guest indications on the host vCPUs scheduling

Re: [PATCH v19 17/21] tests/avocado: s390x cpu topology test dedicated CPU

2023-04-04 Thread Pierre Morel
On 4/4/23 11:19, Cédric Le Goater wrote: On 4/3/23 18:29, Pierre Morel wrote: A dedicated CPU in vertical polarization can only have a high entitlement. Let's check this. Signed-off-by: Pierre Morel ---   tests/avocado/s390_topology.py | 43 +-   1 file

Re: [PATCH v19 02/21] s390x/cpu topology: add topology entries on CPU hotplug

2023-04-04 Thread Pierre Morel
On 4/4/23 09:31, Cédric Le Goater wrote: On 4/3/23 18:28, Pierre Morel wrote: [...] + +/** + * s390_socket_nb: + * @cpu: s390x CPU + * + * Returns the socket number used inside the cores_per_socket array + * for a cpu. + */ +int s390_socket_nb(S390CPU *cpu) s390_socket_nb() doesn't

  1   2   3   4   5   6   7   8   9   10   >