mbox series

[v11,00/11] s390x: CPU Topology

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

Message

Pierre Morel Nov. 3, 2022, 5:01 p.m. UTC
Hi,

The implementation of the CPU Topology in QEMU has been drastically
modified since the last patch series and the number of LOCs has been
greatly reduced.

0) Two new patches in front of the series:
   - A preliminary patch to move the machine properties to the 
     class_init routine
   - The max thread machine class attribute patch.

  Both patches could be taken upstream separatly from each other and
  from the rest of the series.

1) Unnecessary objects have been removed, only a single S390Topology
   object is created to support migration and reset.

2) The introduction of drawers and books is deferred to a later version.

3) A new machine property, topology, is added for new machines for test
   purpose and migration to/from a host without facility 11 from/to a
   host with the facility 11.

Also a documentation has been added to the series.


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 (11):
  s390x: Register TYPE_S390_CCW_MACHINE properties as class properties
  s390x/cpu topology: add max_threads machine class attribute
  s390x/cpu topology: core_id sets s390x CPU topology
  s390x/cpu topology: reporting the CPU topology to the guest
  s390x/cpu_topology: resetting the Topology-Change-Report
  s390x/cpu_topology: CPU topology migration
  target/s390x: interception of PTF instruction
  s390x/cpu topology: add topology_capable QEMU capability
  s390x/cpu topology: add topology machine property
  s390x/cpu_topology: activating CPU topology
  docs/s390x: document s390x cpu topology

 docs/system/s390x/cpu-topology.rst |  80 ++++++++
 include/hw/boards.h                |   3 +
 include/hw/s390x/cpu-topology.h    |  45 +++++
 include/hw/s390x/s390-virtio-ccw.h |  10 +
 target/s390x/cpu.h                 |  81 ++++++++
 target/s390x/kvm/kvm_s390x.h       |   1 +
 hw/core/machine.c                  |   3 +
 hw/s390x/cpu-topology.c            | 286 +++++++++++++++++++++++++++++
 hw/s390x/s390-virtio-ccw.c         | 192 +++++++++++++------
 target/s390x/cpu-sysemu.c          |  21 +++
 target/s390x/cpu_topology.c        | 100 ++++++++++
 target/s390x/kvm/kvm.c             |  50 ++++-
 util/qemu-config.c                 |   4 +
 hw/s390x/meson.build               |   1 +
 qemu-options.hx                    |   6 +-
 target/s390x/meson.build           |   1 +
 16 files changed, 827 insertions(+), 57 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