[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 03/25] s390x/cpu topology: add topology entries on CPU hotplug
From: |
Nina Schoetterl-Glausch |
Subject: |
Re: [PULL 03/25] s390x/cpu topology: add topology entries on CPU hotplug |
Date: |
Thu, 19 Oct 2023 19:57:51 +0200 |
User-agent: |
Evolution 3.48.4 (3.48.4-1.fc38) |
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 :(
> +}
[...]
- [PULL 00/25] s390x patches, Thomas Huth, 2023/10/18
- [PULL 01/25] qapi: machine.json: change docs regarding CPU topology, Thomas Huth, 2023/10/18
- [PULL 03/25] s390x/cpu topology: add topology entries on CPU hotplug, Thomas Huth, 2023/10/18
- Re: [PULL 03/25] s390x/cpu topology: add topology entries on CPU hotplug,
Nina Schoetterl-Glausch <=
- [PULL 05/25] s390x/sclp: reporting the maximum nested topology entries, Thomas Huth, 2023/10/18
- [PULL 07/25] s390x/cpu topology: interception of PTF instruction, Thomas Huth, 2023/10/18
- [PULL 06/25] s390x/cpu topology: resetting the Topology-Change-Report, Thomas Huth, 2023/10/18
[PULL 08/25] target/s390x/cpu topology: activate CPU topology, Thomas Huth, 2023/10/18
[PULL 02/25] CPU topology: extend with s390 specifics, Thomas Huth, 2023/10/18
[PULL 04/25] target/s390x/cpu topology: handle STSI(15) and build the SYSIB, Thomas Huth, 2023/10/18