qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <ajones@ventanamicro.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, Igor Mammedov <imammedo@redhat.com>,
	 Thomas Huth <thuth@redhat.com>,
	Shannon Zhao <shannon.zhaosl@gmail.com>,
	 "Michael S. Tsirkin" <mst@redhat.com>,
	Ani Sinha <anisinha@redhat.com>,
	qemu-arm@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH-for-10.1 v2 03/13] hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment
Date: Thu, 16 Jan 2025 16:16:52 +0100	[thread overview]
Message-ID: <20250116-bf7d225d9fef8277a6315e63@orel> (raw)
In-Reply-To: <20250116145944.38028-4-philmd@linaro.org>

On Thu, Jan 16, 2025 at 03:59:34PM +0100, Philippe Mathieu-Daudé wrote:
> The VirtMachineClass::disallow_affinity_adjustment
> field was only used by virt-2.6 machine, which got
> removed. Remove it and simplify virt_cpu_mp_affinity().
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  include/hw/arm/virt.h |  1 -
>  hw/arm/virt.c         | 30 +++++++++++++++---------------
>  2 files changed, 15 insertions(+), 16 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/hw/arm/virt.c b/hw/arm/virt.c
> index 0080577e1a9..53f4a96e517 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -1759,24 +1759,24 @@ 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;
> +    uint8_t clustersz;
>      VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
>  
> -    if (!vmc->disallow_affinity_adjustment) {
> -        /* 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;
> -        }
> +    /*
> +     * 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.

32-bit KVM hosts are dead a long time, so we could definitely trim
this comment to at least remove those sentences. We'd also have
to double check arm64 KVM to see if the comment is still accurate,
since the comment is so old. Or, we could just delete the comment.

Thanks,
drew

> +     */
> +    if (vms->gic_version == VIRT_GIC_VERSION_2) {
> +        clustersz = GIC_TARGETLIST_BITS;
> +    } else {
> +        clustersz = GICV3_TARGETLIST_BITS;
>      }
> +
>      return arm_build_mp_affinity(idx, clustersz);
>  }
>  
> -- 
> 2.47.1
> 


  reply	other threads:[~2025-01-16 15:17 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 14:59 [PATCH-for-10.1 v2 00/13] hw/arm: Remove virt-2.6 up to virt-2.12 machines Philippe Mathieu-Daudé
2025-01-16 14:59 ` [PATCH-for-10.1 v2 01/13] hw/arm/virt: Remove deprecated virt-2.6 machine Philippe Mathieu-Daudé
2025-01-16 17:42   ` Richard Henderson
2025-01-16 14:59 ` [PATCH-for-10.1 v2 02/13] hw/arm/virt: Remove VirtMachineClass::no_pmu field Philippe Mathieu-Daudé
2025-01-16 17:44   ` Richard Henderson
2025-01-16 14:59 ` [PATCH-for-10.1 v2 03/13] hw/arm/virt: Remove VirtMachineClass::disallow_affinity_adjustment Philippe Mathieu-Daudé
2025-01-16 15:16   ` Andrew Jones [this message]
2025-01-16 19:37     ` Thomas Huth
2025-01-16 17:47   ` Richard Henderson
2025-04-29 15:45   ` Philippe Mathieu-Daudé
2025-01-16 14:59 ` [PATCH-for-10.1 v2 04/13] hw/arm/virt: Remove deprecated virt-2.7 machine Philippe Mathieu-Daudé
2025-01-16 17:47   ` Richard Henderson
2025-01-16 19:37   ` Thomas Huth
2025-01-16 14:59 ` [PATCH-for-10.1 v2 05/13] hw/arm/virt: Remove VirtMachineClass::no_its field Philippe Mathieu-Daudé
2025-01-16 17:54   ` Richard Henderson
2025-01-16 14:59 ` [PATCH-for-10.1 v2 06/13] hw/arm/virt: Remove deprecated virt-2.8 machine Philippe Mathieu-Daudé
2025-01-16 17:56   ` Richard Henderson
2025-01-16 19:39   ` Thomas Huth
2025-01-16 14:59 ` [PATCH-for-10.1 v2 07/13] hw/arm/virt: Remove VirtMachineClass::claim_edge_triggered_timers field Philippe Mathieu-Daudé
2025-01-16 17:58   ` Richard Henderson
2025-01-16 14:59 ` [PATCH-for-10.1 v2 08/13] hw/arm/virt: Remove deprecated virt-2.9 machine Philippe Mathieu-Daudé
2025-01-16 17:58   ` Richard Henderson
2025-01-16 19:40   ` Thomas Huth
2025-01-16 14:59 ` [PATCH-for-10.1 v2 09/13] hw/arm/virt: Remove deprecated virt-2.10 machine Philippe Mathieu-Daudé
2025-01-16 17:59   ` Richard Henderson
2025-01-16 19:41   ` Thomas Huth
2025-01-16 14:59 ` [PATCH-for-10.1 v2 10/13] hw/arm/virt: Remove deprecated virt-2.11 machine Philippe Mathieu-Daudé
2025-01-16 18:03   ` Richard Henderson
2025-01-16 19:45   ` Thomas Huth
2025-01-16 14:59 ` [PATCH-for-10.1 v2 11/13] hw/arm/virt: Remove VirtMachineClass::smbios_old_sys_ver field Philippe Mathieu-Daudé
2025-01-16 18:03   ` Richard Henderson
2025-01-16 14:59 ` [PATCH-for-10.1 v2 12/13] hw/arm/virt: Remove deprecated virt-2.12 machine Philippe Mathieu-Daudé
2025-01-16 18:03   ` Richard Henderson
2025-01-16 19:45   ` Thomas Huth
2025-01-16 14:59 ` [PATCH-for-10.1 v2 13/13] hw/arm/virt: Remove VirtMachineClass::no_highmem_ecam field Philippe Mathieu-Daudé
2025-01-16 18:04   ` Richard Henderson
2025-01-16 21:13 ` [PATCH-for-10.1 v2 00/13] hw/arm: Remove virt-2.6 up to virt-2.12 machines Philippe Mathieu-Daudé
2025-01-17  6:47   ` Thomas Huth
2025-01-17  8:09     ` Daniel P. Berrangé
2025-01-17  8:29       ` Thomas Huth
2025-01-17 11:01         ` Daniel P. Berrangé
2025-01-17  8:44       ` Philippe Mathieu-Daudé
2025-05-02 13:37 ` Peter Maydell
2025-05-02 14:58   ` Philippe Mathieu-Daudé

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=20250116-bf7d225d9fef8277a6315e63@orel \
    --to=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 \
    --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).