From: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>, qemu-s390x@nongnu.org
Subject: Re: [PULL 03/25] s390x/cpu topology: add topology entries on CPU hotplug
Date: Thu, 19 Oct 2023 19:57:51 +0200 [thread overview]
Message-ID: <05b66fe93ec995d48b8c8fbfbd5f9c6098199851.camel@linux.ibm.com> (raw)
In-Reply-To: <20231018130716.286638-4-thuth@redhat.com>
On Wed, 2023-10-18 at 15:06 +0200, Thomas Huth wrote:
> From: Pierre Morel <pmorel@linux.ibm.com>
>
> 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 they are not specified.
> - verify the CPU attributes
> - check that we have still room on the desired socket
>
> The possibility to insert a CPU in a mask is dependent on the
> number of cores allowed in a socket, a book or a drawer, the
> checking is done during the hot plug of the CPU to have an
> immediate answer.
>
> If the complete topology is not specified, the core is added
> in the physical 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 <pmorel@linux.ibm.com>
> Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
> Co-developed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
> Message-ID: <20231016183925.2384704-4-nsg@linux.ibm.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> MAINTAINERS | 6 +
> include/hw/s390x/cpu-topology.h | 54 +++++++
> hw/s390x/cpu-topology.c | 259 ++++++++++++++++++++++++++++++++
> hw/s390x/s390-virtio-ccw.c | 22 ++-
> hw/s390x/meson.build | 1 +
> 5 files changed, 340 insertions(+), 2 deletions(-)
> create mode 100644 include/hw/s390x/cpu-topology.h
> create mode 100644 hw/s390x/cpu-topology.c
[...]
> --- /dev/null
> +++ b/include/hw/s390x/cpu-topology.h
> @@ -0,0 +1,54 @@
> +/* SPDX-License-Identifier: GPL-2.0-or-later */
> +/*
> + * CPU Topology
> + *
> + * Copyright IBM Corp. 2022, 2023
> + * Author(s): Pierre Morel <pmorel@linux.ibm.com>
> + *
> + */
> +#ifndef HW_S390X_CPU_TOPOLOGY_H
> +#define HW_S390X_CPU_TOPOLOGY_H
> +
> +#ifndef CONFIG_USER_ONLY
> +
> +#include "qemu/queue.h"
> +#include "hw/boards.h"
> +#include "qapi/qapi-types-machine-target.h"
> +
> +typedef struct S390Topology {
> + uint8_t *cores_per_socket;
> +} S390Topology;
> +
> +#ifdef CONFIG_KVM
> +bool s390_has_topology(void);
> +void s390_topology_setup_cpu(MachineState *ms, S390CPU *cpu, Error **errp);
> +#else
> +static inline bool s390_has_topology(void)
> +{
> + return false;
Just noticed that the indent is off here :(
> +}
[...]
next prev parent reply other threads:[~2023-10-19 17:58 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-18 13:06 [PULL 00/25] s390x patches Thomas Huth
2023-10-18 13:06 ` [PULL 01/25] qapi: machine.json: change docs regarding CPU topology Thomas Huth
2023-10-18 13:06 ` [PULL 02/25] CPU topology: extend with s390 specifics Thomas Huth
2023-10-18 13:06 ` [PULL 03/25] s390x/cpu topology: add topology entries on CPU hotplug Thomas Huth
2023-10-19 17:57 ` Nina Schoetterl-Glausch [this message]
2023-10-18 13:06 ` [PULL 04/25] target/s390x/cpu topology: handle STSI(15) and build the SYSIB Thomas Huth
2023-10-18 13:06 ` [PULL 05/25] s390x/sclp: reporting the maximum nested topology entries Thomas Huth
2023-10-18 13:06 ` [PULL 06/25] s390x/cpu topology: resetting the Topology-Change-Report Thomas Huth
2023-10-19 16:35 ` Stefan Hajnoczi
2023-10-19 17:55 ` Nina Schoetterl-Glausch
2023-10-19 19:32 ` Thomas Huth
2023-10-20 9:26 ` Nina Schoetterl-Glausch
2023-10-18 13:06 ` [PULL 07/25] s390x/cpu topology: interception of PTF instruction Thomas Huth
2023-10-18 13:06 ` [PULL 08/25] target/s390x/cpu topology: activate CPU topology Thomas Huth
2023-10-18 13:07 ` [PULL 09/25] qapi/s390x/cpu topology: set-cpu-topology qmp command Thomas Huth
2023-10-18 13:07 ` [PULL 10/25] machine: adding s390 topology to query-cpu-fast Thomas Huth
2023-10-18 13:07 ` [PULL 11/25] machine: adding s390 topology to info hotpluggable-cpus Thomas Huth
2023-10-18 13:07 ` [PULL 12/25] qapi/s390x/cpu topology: CPU_POLARIZATION_CHANGE QAPI event Thomas Huth
2023-10-18 13:07 ` [PULL 13/25] qapi/s390x/cpu topology: add query-s390x-cpu-polarization command Thomas Huth
2023-10-18 13:07 ` [PULL 14/25] docs/s390x/cpu topology: document s390x cpu topology Thomas Huth
2023-10-18 13:07 ` [PULL 15/25] tests/avocado: s390x cpu topology core Thomas Huth
2023-10-18 13:07 ` [PULL 16/25] tests/avocado: s390x cpu topology polarization Thomas Huth
2023-10-18 13:07 ` [PULL 17/25] tests/avocado: s390x cpu topology entitlement tests Thomas Huth
2023-10-18 13:07 ` [PULL 18/25] tests/avocado: s390x cpu topology test dedicated CPU Thomas Huth
2023-10-18 13:07 ` [PULL 19/25] tests/avocado: s390x cpu topology test socket full Thomas Huth
2023-10-18 13:07 ` [PULL 20/25] tests/avocado: s390x cpu topology dedicated errors Thomas Huth
2023-10-18 13:07 ` [PULL 21/25] tests/avocado: s390x cpu topology bad move Thomas Huth
2023-10-18 13:07 ` [PULL 22/25] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req() Thomas Huth
2023-10-18 13:07 ` [PULL 23/25] target/s390x/kvm: Turn KVM_CAP_SYNC_REGS into a hard requirement Thomas Huth
2023-10-18 13:07 ` [PULL 24/25] target/s390x/kvm: Simplify the GPRs, ACRs, CRs and prefix synchronization code Thomas Huth
2023-10-18 13:07 ` [PULL 25/25] tests/qtest/migration-test: Disable the analyze-migration.py test on s390x Thomas Huth
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=05b66fe93ec995d48b8c8fbfbd5f9c6098199851.camel@linux.ibm.com \
--to=nsg@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=stefanha@redhat.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).