mbox series

[v12,0/7] s390x: CPU Topology

Message ID 20221129174206.84882-1-pmorel@linux.ibm.com (mailing list archive)
Headers show
Series s390x: CPU Topology | expand

Message

Pierre Morel Nov. 29, 2022, 5:41 p.m. UTC
Hi,

The implementation of the CPU Topology in QEMU has been modified
since the last patch series.

- The two preliminary patches have been accepted and are no longer
  part of this series.

- The topology machine property has been abandoned

- the topology_capable QEMU capability has been abandoned

- both where replaced with a new CPU feature, topology-disable
  to fence per default the ctop topology information feature.

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 2022-07-20 KVM: s390: guest support for topology function     
0130337ec45b 2022-07-20 KVM: s390: Cleanup ipte lock access and SIIF fac.. 

Currently this code is for KVM only, I have no idea if it is interesting
to provide a TCG patch. If ever it will be done in another series.

To have a better understanding of the S390x CPU Topology and its
implementation in QEMU you can have a look at the documentation in the
last patch of this 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 Morel (7):
  s390x/cpu topology: Creating CPU topology device
  s390x/cpu topology: reporting the CPU topology to the guest
  s390x/cpu_topology: resetting the Topology-Change-Report
  s390x/cpu_topology: CPU topology migration
  s390x/cpu_topology: interception of PTF instruction
  s390x/cpu_topology: activating CPU topology
  docs/s390x: document s390x cpu topology

 docs/system/s390x/cpu-topology.rst  |  80 +++++++++++
 include/hw/s390x/cpu-topology.h     |  41 ++++++
 include/hw/s390x/s390-virtio-ccw.h  |   7 +
 target/s390x/cpu.h                  |  79 +++++++++++
 target/s390x/kvm/kvm_s390x.h        |   1 +
 target/s390x/cpu_features_def.h.inc |   1 +
 hw/s390x/cpu-topology.c             | 200 ++++++++++++++++++++++++++++
 hw/s390x/s390-virtio-ccw.c          |  38 +++++-
 target/s390x/cpu-sysemu.c           |  21 +++
 target/s390x/cpu_models.c           |  17 +++
 target/s390x/cpu_topology.c         | 191 ++++++++++++++++++++++++++
 target/s390x/gen-features.c         |   3 +
 target/s390x/kvm/kvm.c              |  48 ++++++-
 hw/s390x/meson.build                |   1 +
 target/s390x/meson.build            |   1 +
 15 files changed, 721 insertions(+), 8 deletions(-)
 create mode 100644 docs/system/s390x/cpu-topology.rst
 create mode 100644 include/hw/s390x/cpu-topology.h
 create mode 100644 hw/s390x/cpu-topology.c
 create mode 100644 target/s390x/cpu_topology.c

Comments

Cédric Le Goater Dec. 1, 2022, 8:45 a.m. UTC | #1
Hello Pierre

On 11/29/22 18:41, Pierre Morel wrote:
> Hi,
> 
> The implementation of the CPU Topology in QEMU has been modified
> since the last patch series.
> 
> - The two preliminary patches have been accepted and are no longer
>    part of this series.
> 
> - The topology machine property has been abandoned
> 
> - the topology_capable QEMU capability has been abandoned
> 
> - both where replaced with a new CPU feature, topology-disable
>    to fence per default the ctop topology information feature.
> 
> 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 2022-07-20 KVM: s390: guest support for topology function
> 0130337ec45b 2022-07-20 KVM: s390: Cleanup ipte lock access and SIIF fac..
> 
> Currently this code is for KVM only, I have no idea if it is interesting
> to provide a TCG patch. If ever it will be done in another series.
> 
> To have a better understanding of the S390x CPU Topology and its
> implementation in QEMU you can have a look at the documentation in the
> last patch of this 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.
Please make sure the patchset compiles on non-s390x platforms and check
that the documentation generates correctly. You will need to install :

   python3-sphinx python3-sphinx_rtd_theme

'configure' should then enable doc generation.

Thanks,

C.
Pierre Morel Dec. 1, 2022, 1:23 p.m. UTC | #2
On 12/1/22 09:45, Cédric Le Goater wrote:
> Hello Pierre
> 
> On 11/29/22 18:41, Pierre Morel wrote:
>> Hi,
>>
>> The implementation of the CPU Topology in QEMU has been modified
>> since the last patch series.
>>
>> - The two preliminary patches have been accepted and are no longer
>>    part of this series.
>>
>> - The topology machine property has been abandoned
>>
>> - the topology_capable QEMU capability has been abandoned
>>
>> - both where replaced with a new CPU feature, topology-disable
>>    to fence per default the ctop topology information feature.
>>
>> 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 2022-07-20 KVM: s390: guest support for topology function
>> 0130337ec45b 2022-07-20 KVM: s390: Cleanup ipte lock access and SIIF 
>> fac..
>>
>> Currently this code is for KVM only, I have no idea if it is interesting
>> to provide a TCG patch. If ever it will be done in another series.
>>
>> To have a better understanding of the S390x CPU Topology and its
>> implementation in QEMU you can have a look at the documentation in the
>> last patch of this 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.

Hello Cedric,

> Please make sure the patchset compiles on non-s390x platforms and check

Yes,

> that the documentation generates correctly. You will need to install :
> 
>    python3-sphinx python3-sphinx_rtd_theme
> 
> 'configure' should then enable doc generation.

Yes, thanks,

Pierre

> 
> Thanks,
> 
> C.
>