qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
To: Pierre Morel <pmorel@linux.ibm.com>, qemu-s390x@nongnu.org
Cc: qemu-devel@nongnu.org, borntraeger@de.ibm.com,
	pasic@linux.ibm.com, richard.henderson@linaro.org,
	david@redhat.com, thuth@redhat.com, cohuck@redhat.com,
	mst@redhat.com, pbonzini@redhat.com, kvm@vger.kernel.org,
	ehabkost@redhat.com, marcel.apfelbaum@gmail.com,
	eblake@redhat.com, armbru@redhat.com, seiden@linux.ibm.com,
	nrb@linux.ibm.com, frankja@linux.ibm.com
Subject: Re: [PATCH v9 10/10] docs/s390x: document s390x cpu topology
Date: Mon, 12 Sep 2022 15:41:44 +0200	[thread overview]
Message-ID: <f1270e3783e72641a0e8a4ba138a6e858f82cc80.camel@linux.ibm.com> (raw)
In-Reply-To: <20220902075531.188916-11-pmorel@linux.ibm.com>

On Fri, 2022-09-02 at 09:55 +0200, Pierre Morel wrote:
> Add some basic examples for the definition of cpu topology
> in s390x.
> 
> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
> ---
>  docs/system/s390x/cpu_topology.rst | 88 ++++++++++++++++++++++++++++++
>  1 file changed, 88 insertions(+)
>  create mode 100644 docs/system/s390x/cpu_topology.rst
> 
> diff --git a/docs/system/s390x/cpu_topology.rst b/docs/system/s390x/cpu_topology.rst
> new file mode 100644
> index 0000000000..00977d4319
> --- /dev/null
> +++ b/docs/system/s390x/cpu_topology.rst
> @@ -0,0 +1,88 @@
> +CPU Topology on s390x
> +=====================
> +
> +CPU Topology on S390x provides up to 4 levels of topology containers:
> +drawers, books, sockets and CPUs.
> +While the three higher level containers, Containers Topology List Entries,
> +(Containers TLE) define a tree hierarchy, the lowest level of topology
> +definition, the CPU Topology List Entry (CPU TLE), provides the placement
> +of the CPUs inside the last container.

inside the parent container
> +
> +Prerequisites
> +-------------
> +
> +To use CPU Topology a Linux QEMU/KVM machine providing the CPU Topology facility
> +(STFLE bit 11) is required.
> +
> +However, since this facility has been enabled by default in an early version,
> +the capability ``KVM_CAP_S390_CPU_TOPOLOGY`` is needed to indicate to KVM
> +that QEMU support CPU Topology.

I don't understand this paragraph. Early version of what?
> +
> +Indicating the CPU topology to the Virtual Machine
> +--------------------------------------------------
> +
> +The CPU Topology, number of drawers, number of books per drawers, number of
> +sockets per book and number of cores per sockets is specified with the
> +``-smp`` qemu command arguments.
> +
> +Like in :
> +
> +.. code-block:: sh
> +    -smp cpus=1,drawers=3,books=4,sockets=2,cores=8,maxcpus=192
> +
> +If drawers or books are not specified, their default to 1.
> +
> +New CPUs can be plugged using the device_add hmp command like in:
> +
> +.. code-block:: sh
> +   (qemu) device_add host-s390x-cpu,core-id=9
> +
> +The core-id defines the placement of the core in the topology by
> +starting with core 0 in socket 0, book 0 and drawer 0 up to the maximum
> +core number of the last socket of the last book in the last drawer.
> +
> +In the example above:
> +
> +* the core with ID 9 will be placed in container (0,0,1), as core 9
> +  of CPU TLE 0 of socket 1 in book 0 from drawer 0.
> +* the core ID 0 is defined by the -smp cpus=1 command and will be
> +  placed as core 0 in CPU TLE 0 of container (0,0,0)
> +
> +Note that the core ID is machine wide and the CPU TLE masks provided
> +by the STSI instruction will be:
> +
> +* in socket 0: 0x80000000 (core id 0)
> +* in socket 1: 0x00400000 (core id 9)
> +
> +Indicating the CPU topology to the Guest
> +----------------------------------------
> +
> +The guest can query for topology changes using the PTF instruction.
> +In case of a topology change it can request the new topology by issuing
> +STSI instructions specifying the level of detail required, drawer with
> +STSI(15.1.4) or books STSI(15.1.3).
> +
> +The virtual machine will fill the provided buffer with the count of
> +drawers (MAG4), books per drawer (MAG3), sockets per book (MAG2) and
> +cores per socket (MAG1).
> +
> +Note that the STSI(15.1.2) is special in two ways:
> +
> +* When the firmware detect a change in the values calculated for STSI(15.1.2)
> +  it will trigger the report of the topology change for the PTF instruction.

I don't know if we need this section, after all documenting this is the
job of the principles of operation. You could just refer to the
relevant sections.
> +
> +Migration
> +---------
> +
> +For virtio-ccw machines older than s390-virtio-ccw-7.2, CPU Topoogy is
> +by default disabled.
> +
> +CPU Topoogy is by default enabled for s390-virtio-ccw-7.2 and newer machines.
> +
> +Enabling the CPU topology on older Machine is done by setting the global
> +option ''topology-disable'' to false before enabling cpu topology with the
> +cpu feature "ctop" like in:
> +
> +.. code-block:: sh
> +   -machine s390-ccw-virtio-3.0,accel=kvm,topology-disable=false
> +   -cpu z14,ctop=on



  reply	other threads:[~2022-09-12 13:43 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02  7:55 [PATCH v9 00/10] s390x: CPU Topology Pierre Morel
2022-09-02  7:55 ` [PATCH v9 01/10] s390x/cpus: Make absence of multithreading clear Pierre Morel
2022-09-05 11:32   ` Nico Boehr
2022-09-05 15:10     ` Pierre Morel
2022-09-05 15:23       ` Janis Schoetterl-Glausch
2022-09-05 15:42         ` Pierre Morel
2022-09-27  9:44       ` Cédric Le Goater
2022-09-28 13:21         ` Pierre Morel
2022-09-28 16:16           ` Pierre Morel
2022-09-28 16:28             ` Cédric Le Goater
2022-10-11  7:21               ` Pierre Morel
2022-10-11  7:28                 ` Cédric Le Goater
2022-09-28 18:11   ` Daniel P. Berrangé
2022-10-10 17:20     ` Pierre Morel
2022-09-02  7:55 ` [PATCH v9 02/10] s390x/cpu topology: core_id sets s390x CPU topology Pierre Morel
2022-09-05 18:11   ` Janis Schoetterl-Glausch
2022-09-12 15:34     ` Pierre Morel
2022-09-06  5:58   ` Nico Boehr
2022-09-12 15:40     ` Pierre Morel
2022-09-27 12:03   ` Cédric Le Goater
2022-09-28 13:15     ` Pierre Morel
2022-09-02  7:55 ` [PATCH v9 03/10] s390x/cpu topology: reporting the CPU topology to the guest Pierre Morel
2022-09-06  8:17   ` Nico Boehr
2022-09-28 10:03     ` Pierre Morel
2022-09-06 11:49   ` Janis Schoetterl-Glausch
2022-09-28 10:01     ` Pierre Morel
2022-09-07 10:26   ` Janis Schoetterl-Glausch
2022-09-28  9:07     ` Pierre Morel
2022-09-02  7:55 ` [PATCH v9 04/10] hw/core: introducing drawer and books for s390x Pierre Morel
2022-09-06  8:59   ` Markus Armbruster
2022-09-28  9:04     ` Pierre Morel
2022-09-28  9:06     ` Pierre Morel
2022-09-02  7:55 ` [PATCH v9 05/10] s390x/cpu: reporting drawers and books topology to the guest Pierre Morel
2022-09-07 10:36   ` Janis Schoetterl-Glausch
2022-09-28  8:55     ` Pierre Morel
2022-09-02  7:55 ` [PATCH v9 06/10] s390x/cpu_topology: resetting the Topology-Change-Report Pierre Morel
2022-09-06  8:27   ` Nico Boehr
2022-09-28  8:35     ` Pierre Morel
2022-09-08  7:57   ` Janis Schoetterl-Glausch
2022-09-28  8:46     ` Pierre Morel
2022-09-02  7:55 ` [PATCH v9 07/10] s390x/cpu_topology: CPU topology migration Pierre Morel
2022-09-08 18:04   ` Janis Schoetterl-Glausch
2022-09-28  8:34     ` Pierre Morel
2022-09-29 17:30       ` Pierre Morel
2022-09-02  7:55 ` [PATCH v9 08/10] target/s390x: interception of PTF instruction Pierre Morel
2022-09-09 16:50   ` Janis Schoetterl-Glausch
2022-09-28 13:34     ` Pierre Morel
2022-09-02  7:55 ` [PATCH v9 09/10] s390x/cpu_topology: activating CPU topology Pierre Morel
2022-09-05 15:29   ` Pierre Morel
2022-09-27 14:41   ` Cédric Le Goater
2022-09-28  8:15     ` Pierre Morel
2022-09-02  7:55 ` [PATCH v9 10/10] docs/s390x: document s390x cpu topology Pierre Morel
2022-09-12 13:41   ` Janis Schoetterl-Glausch [this message]
2022-09-28  8:19     ` Pierre Morel
2022-09-12 13:48   ` Janis Schoetterl-Glausch
2022-09-12 14:38 ` [PATCH v9 00/10] s390x: CPU Topology Janis Schoetterl-Glausch
2022-09-28  8:28   ` Pierre Morel
2022-11-16 16:51 ` Christian Borntraeger
2022-11-17  9:31   ` Pierre Morel
2022-11-17 16:38     ` Pierre Morel
2022-11-24  9:25       ` Pierre Morel
2022-11-27 10:50         ` Pierre Morel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f1270e3783e72641a0e8a4ba138a6e858f82cc80.camel@linux.ibm.com \
    --to=scgl@linux.ibm.com \
    --cc=armbru@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=nrb@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=pmorel@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=seiden@linux.ibm.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).