From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Ani Sinha <anisinha@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Andrew Jones <ajones@ventanamicro.com>,
qemu-arm@nongnu.org, Shannon Zhao <shannon.zhaosl@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH 03/13] hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment
Date: Thu, 16 Jan 2025 08:03:38 +0100 [thread overview]
Message-ID: <da2fe302-dae9-4f6c-8ea8-94fcc332e167@redhat.com> (raw)
In-Reply-To: <20250115171009.19302-4-philmd@linaro.org>
On 15/01/2025 18.09, Philippe Mathieu-Daudé wrote:
> The VirtMachineClass::disallow_affinity_adjustment
> field was only used by virt-2.6 machine, which got
> removed. Remove it along with the GIC*_TARGETLIST_BITS
> definitions, and simplify virt_cpu_mp_affinity().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/hw/arm/virt.h | 1 -
> include/hw/intc/arm_gic.h | 1 -
> include/hw/intc/arm_gicv3_common.h | 3 ---
> hw/arm/virt.c | 16 ----------------
> 4 files changed, 21 deletions(-)
>
> diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h
> index 27c5bb585cb..5d3b25509ff 100644
> --- a/include/hw/arm/virt.h
> +++ b/include/hw/arm/virt.h
> @@ -117,7 +117,6 @@ typedef enum VirtGICType {
>
> struct VirtMachineClass {
> MachineClass parent;
> - bool disallow_affinity_adjustment;
> bool no_its;
> bool no_tcg_its;
> bool claim_edge_triggered_timers;
> diff --git a/include/hw/intc/arm_gic.h b/include/hw/intc/arm_gic.h
> index 48f6a51a70a..f5e6e5e70b4 100644
> --- a/include/hw/intc/arm_gic.h
> +++ b/include/hw/intc/arm_gic.h
> @@ -68,7 +68,6 @@
> #include "qom/object.h"
>
> /* Number of SGI target-list bits */
> -#define GIC_TARGETLIST_BITS 8
> #define GIC_MAX_PRIORITY_BITS 8
> #define GIC_MIN_PRIORITY_BITS 4
>
> diff --git a/include/hw/intc/arm_gicv3_common.h b/include/hw/intc/arm_gicv3_common.h
> index a3d6a0e5077..fff5e55a97d 100644
> --- a/include/hw/intc/arm_gicv3_common.h
> +++ b/include/hw/intc/arm_gicv3_common.h
> @@ -45,9 +45,6 @@
> #define GICV3_REDIST_SIZE 0x20000
> #define GICV4_REDIST_SIZE 0x40000
>
> -/* Number of SGI target-list bits */
> -#define GICV3_TARGETLIST_BITS 16
> -
> /* Maximum number of list registers (architectural limit) */
> #define GICV3_LR_MAX 16
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 0080577e1a9..2a2a0bd9154 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -1760,23 +1760,7 @@ void virt_machine_done(Notifier *notifier, void *data)
> static uint64_t virt_cpu_mp_affinity(VirtMachineState *vms, int idx)
> {
> uint8_t clustersz = ARM_DEFAULT_CPUS_PER_CLUSTER;
> - VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
>
> - if (!vmc->disallow_affinity_adjustment) {
I think this change is wrong - disallow_affinity_adjustment is false for
newer machines, so you removed code here that is still in use on newer machines?
Thomas
> - /* Adjust MPIDR like 64-bit KVM hosts, which incorporate the
> - * GIC's target-list limitations. 32-bit KVM hosts currently
> - * always create clusters of 4 CPUs, but that is expected to
> - * change when they gain support for gicv3. When KVM is enabled
> - * it will override the changes we make here, therefore our
> - * purposes are to make TCG consistent (with 64-bit KVM hosts)
> - * and to improve SGI efficiency.
> - */
> - if (vms->gic_version == VIRT_GIC_VERSION_2) {
> - clustersz = GIC_TARGETLIST_BITS;
> - } else {
> - clustersz = GICV3_TARGETLIST_BITS;
> - }
> - }
> return arm_build_mp_affinity(idx, clustersz);
> }
>
next prev parent reply other threads:[~2025-01-16 7:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 17:09 [PATCH 00/13] hw/arm: Remove virt-2.6 up to virt-2.12 machines Philippe Mathieu-Daudé
2025-01-15 17:09 ` [PATCH 01/13] hw/arm/virt: Remove deprecated virt-2.6 machine Philippe Mathieu-Daudé
2025-01-15 17:16 ` Philippe Mathieu-Daudé
2025-01-16 6:52 ` Thomas Huth
2025-01-15 17:09 ` [PATCH 02/13] hw/arm/virt: Remove VirtMachineClass::no_pmu field Philippe Mathieu-Daudé
2025-01-16 6:48 ` Thomas Huth
2025-01-15 17:09 ` [PATCH 03/13] hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment Philippe Mathieu-Daudé
2025-01-16 7:03 ` Thomas Huth [this message]
2025-01-16 8:40 ` Philippe Mathieu-Daudé
2025-01-15 17:10 ` [PATCH 04/13] hw/arm/virt: Remove deprecated virt-2.7 machine Philippe Mathieu-Daudé
2025-01-15 17:10 ` [PATCH 05/13] hw/arm/virt: Remove VirtMachineClass::no_its field Philippe Mathieu-Daudé
2025-01-16 7:10 ` Thomas Huth
2025-01-15 17:10 ` [PATCH 06/13] hw/arm/virt: Remove deprecated virt-2.8 machine Philippe Mathieu-Daudé
2025-01-15 17:10 ` [PATCH 07/13] hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers field Philippe Mathieu-Daudé
2025-01-16 7:13 ` Thomas Huth
2025-01-15 17:10 ` [PATCH 08/13] hw/arm/virt: Remove deprecated virt-2.9 machine Philippe Mathieu-Daudé
2025-01-15 17:10 ` [PATCH 09/13] hw/arm/virt: Remove deprecated virt-2.10 machine Philippe Mathieu-Daudé
2025-01-15 17:10 ` [PATCH 10/13] hw/arm/virt: Remove deprecated virt-2.11 machine Philippe Mathieu-Daudé
2025-01-15 17:10 ` [PATCH 11/13] hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field Philippe Mathieu-Daudé
2025-01-16 8:23 ` Thomas Huth
2025-01-15 17:10 ` [PATCH 12/13] hw/arm/virt: Remove deprecated virt-2.12 machine Philippe Mathieu-Daudé
2025-01-15 17:10 ` [PATCH 13/13] hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field Philippe Mathieu-Daudé
2025-01-16 8:26 ` 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=da2fe302-dae9-4f6c-8ea8-94fcc332e167@redhat.com \
--to=thuth@redhat.com \
--cc=ajones@ventanamicro.com \
--cc=anisinha@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shannon.zhaosl@gmail.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).