Skip to content

Commit

Permalink
docs/s390: clarify even more that cpu-topology is KVM-only
Browse files Browse the repository at this point in the history
At least for now cpu-topology is implemented only for KVM.

We already say this, but this tries to be more explicit,
and also show it in the examples.

This adds a new reference in the introduction that we can point to,
whenever we need to reference accelerators and how to select them.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Message-ID: <20240314172218.16478-1-cfontana@suse.de>
Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Tested-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
Claudio Fontana authored and huth committed Mar 15, 2024
1 parent ba49d76 commit b176934
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docs/system/introduction.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Introduction
============

.. _Accelerators:

Virtualisation Accelerators
---------------------------

Expand Down
14 changes: 8 additions & 6 deletions docs/system/s390x/cpu-topology.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ monitor polarization changes, see ``docs/devel/s390-cpu-topology.rst``.
Prerequisites
-------------

To use the CPU topology, you need to run with KVM on a s390x host that
uses the Linux kernel v6.0 or newer (which provide the so-called
To use the CPU topology, you currently need to choose the KVM accelerator.
See :ref:`Accelerators` for more details about accelerators and how to select them.

The s390x host needs to use a Linux kernel v6.0 or newer (which provides the so-called
``KVM_CAP_S390_CPU_TOPOLOGY`` capability that allows QEMU to signal the
CPU topology facility via the so-called STFLE bit 11 to the VM).

Enabling CPU topology
---------------------

Currently, CPU topology is only enabled in the host model by default.
Currently, CPU topology is enabled by default only in the "host" CPU model.

Enabling CPU topology in a CPU model is done by setting the CPU flag
Enabling CPU topology in another CPU model is done by setting the CPU flag
``ctop`` to ``on`` as in:

.. code-block:: bash
Expand Down Expand Up @@ -132,7 +134,7 @@ In the following machine we define 8 sockets with 4 cores each.

.. code-block:: bash
$ qemu-system-s390x -m 2G \
$ qemu-system-s390x -accel kvm -m 2G \
-cpu gen16b,ctop=on \
-smp cpus=5,sockets=8,cores=4,maxcpus=32 \
-device host-s390x-cpu,core-id=14 \
Expand Down Expand Up @@ -227,7 +229,7 @@ with vertical high entitlement.

.. code-block:: bash
$ qemu-system-s390x -m 2G \
$ qemu-system-s390x -accel kvm -m 2G \
-cpu gen16b,ctop=on \
-smp cpus=1,sockets=8,cores=4,maxcpus=32 \
\
Expand Down

0 comments on commit b176934

Please sign in to comment.