All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron via <qemu-arm@nongnu.org>
To: Alireza Sanaee <alireza.sanaee@huawei.com>
Cc: <qemu-devel@nongnu.org>, <gustavo.romero@linaro.org>,
	<anisinha@redhat.com>, <armbru@redhat.com>, <berrange@redhat.com>,
	<dapeng1.mi@linux.intel.com>, <eric.auger@redhat.com>,
	<farman@linux.ibm.com>, <imammedo@redhat.com>,
	<jiangkunkun@huawei.com>, <maobibo@loongson.cn>, <mst@redhat.com>,
	<mtosatti@redhat.com>, <peter.maydell@linaro.org>,
	<philmd@linaro.org>, <qemu-arm@nongnu.org>,
	<richard.henderson@linaro.org>, <shannon.zhaosl@gmail.com>,
	<yangyicong@hisilicon.com>, <linuxarm@huawei.com>,
	<zhao1.liu@intel.com>
Subject: Re: [PATCH v17 1/8] target/arm/tcg: increase cache level for cpu=max
Date: Tue, 6 Jan 2026 16:11:54 +0000	[thread overview]
Message-ID: <20260106161154.000067f7@huawei.com> (raw)
In-Reply-To: <20260106155828.643-2-alireza.sanaee@huawei.com>

On Tue, 6 Jan 2026 15:58:20 +0000
Alireza Sanaee <alireza.sanaee@huawei.com> wrote:

> This patch addresses cache description in the `aarch64_max_tcg_initfn`
> function for cpu=max. It introduces three levels of caches and modifies
> the cache description registers accordingly.
Hi Ali,

Not (I think) worth a respin, but this would ideally say why.
Maybe something about presenting a more realistic setup and ensuring
the cache topology can be sufficiently complex to exercise that code
on TCG?

J
> 
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Alireza Sanaee <alireza.sanaee@huawei.com>
> ---
>  target/arm/tcg/cpu64.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c
> index 917db5bb09..be192d62ff 100644
> --- a/target/arm/tcg/cpu64.c
> +++ b/target/arm/tcg/cpu64.c
> @@ -1167,6 +1167,16 @@ void aarch64_max_tcg_initfn(Object *obj)
>      uint64_t t;
>      uint32_t u;
>  
> +    SET_IDREG(isar, CLIDR, 0x8200123);
> +    /* 64KB L1 dcache */
> +    cpu->ccsidr[0] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 4, 64, 64 * KiB, 7);
> +    /* 64KB L1 icache */
> +    cpu->ccsidr[1] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 4, 64, 64 * KiB, 2);
> +    /* 1MB L2 unified cache */
> +    cpu->ccsidr[2] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 8, 64, 1 * MiB, 7);
> +    /* 2MB L3 unified cache */
> +    cpu->ccsidr[4] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 8, 64, 2 * MiB, 7);
> +
>      /*
>       * Unset ARM_FEATURE_BACKCOMPAT_CNTFRQ, which we would otherwise default
>       * to because we started with aarch64_a57_initfn(). A 'max' CPU might



WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Alireza Sanaee <alireza.sanaee@huawei.com>
Cc: <qemu-devel@nongnu.org>, <gustavo.romero@linaro.org>,
	<anisinha@redhat.com>, <armbru@redhat.com>, <berrange@redhat.com>,
	<dapeng1.mi@linux.intel.com>, <eric.auger@redhat.com>,
	<farman@linux.ibm.com>, <imammedo@redhat.com>,
	<jiangkunkun@huawei.com>, <maobibo@loongson.cn>, <mst@redhat.com>,
	<mtosatti@redhat.com>, <peter.maydell@linaro.org>,
	<philmd@linaro.org>, <qemu-arm@nongnu.org>,
	<richard.henderson@linaro.org>, <shannon.zhaosl@gmail.com>,
	<yangyicong@hisilicon.com>, <linuxarm@huawei.com>,
	<zhao1.liu@intel.com>
Subject: Re: [PATCH v17 1/8] target/arm/tcg: increase cache level for cpu=max
Date: Tue, 6 Jan 2026 16:11:54 +0000	[thread overview]
Message-ID: <20260106161154.000067f7@huawei.com> (raw)
In-Reply-To: <20260106155828.643-2-alireza.sanaee@huawei.com>

On Tue, 6 Jan 2026 15:58:20 +0000
Alireza Sanaee <alireza.sanaee@huawei.com> wrote:

> This patch addresses cache description in the `aarch64_max_tcg_initfn`
> function for cpu=max. It introduces three levels of caches and modifies
> the cache description registers accordingly.
Hi Ali,

Not (I think) worth a respin, but this would ideally say why.
Maybe something about presenting a more realistic setup and ensuring
the cache topology can be sufficiently complex to exercise that code
on TCG?

J
> 
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Alireza Sanaee <alireza.sanaee@huawei.com>
> ---
>  target/arm/tcg/cpu64.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c
> index 917db5bb09..be192d62ff 100644
> --- a/target/arm/tcg/cpu64.c
> +++ b/target/arm/tcg/cpu64.c
> @@ -1167,6 +1167,16 @@ void aarch64_max_tcg_initfn(Object *obj)
>      uint64_t t;
>      uint32_t u;
>  
> +    SET_IDREG(isar, CLIDR, 0x8200123);
> +    /* 64KB L1 dcache */
> +    cpu->ccsidr[0] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 4, 64, 64 * KiB, 7);
> +    /* 64KB L1 icache */
> +    cpu->ccsidr[1] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 4, 64, 64 * KiB, 2);
> +    /* 1MB L2 unified cache */
> +    cpu->ccsidr[2] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 8, 64, 1 * MiB, 7);
> +    /* 2MB L3 unified cache */
> +    cpu->ccsidr[4] = make_ccsidr(CCSIDR_FORMAT_LEGACY, 8, 64, 2 * MiB, 7);
> +
>      /*
>       * Unset ARM_FEATURE_BACKCOMPAT_CNTFRQ, which we would otherwise default
>       * to because we started with aarch64_a57_initfn(). A 'max' CPU might



  reply	other threads:[~2026-01-06 16:12 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06 15:58 [PATCH v17 0/8] Specifying cache topology on ARM Alireza Sanaee via
2026-01-06 15:58 ` Alireza Sanaee via
2026-01-06 15:58 ` [PATCH v17 1/8] target/arm/tcg: increase cache level for cpu=max Alireza Sanaee via
2026-01-06 15:58   ` Alireza Sanaee via
2026-01-06 16:11   ` Jonathan Cameron via [this message]
2026-01-06 16:11     ` Jonathan Cameron via
2026-01-06 15:58 ` [PATCH v17 2/8] hw/core/machine: topology functions capabilities added Alireza Sanaee via
2026-01-06 15:58   ` Alireza Sanaee via
2026-01-06 16:14   ` Jonathan Cameron via
2026-01-06 16:14     ` Jonathan Cameron via
2026-01-06 15:58 ` [PATCH v17 3/8] hw/arm/virt: add cache hierarchy to device tree Alireza Sanaee via
2026-01-06 15:58   ` Alireza Sanaee via
2026-01-06 15:58 ` [PATCH v17 4/8] bios-tables-test: prepare to change ARM ACPI virt PPTT Alireza Sanaee via
2026-01-06 15:58   ` Alireza Sanaee via
2026-01-06 15:58 ` [PATCH v17 5/8] acpi: add caches to ACPI build_pptt table function Alireza Sanaee via
2026-01-06 15:58   ` Alireza Sanaee via
2026-01-06 16:19   ` Jonathan Cameron via
2026-01-06 16:19     ` Jonathan Cameron via
2026-01-06 15:58 ` [PATCH v17 6/8] hw/acpi: add cache hierarchy to pptt table Alireza Sanaee via
2026-01-06 15:58   ` Alireza Sanaee via
2026-01-06 16:42   ` Jonathan Cameron via
2026-01-06 16:42     ` Jonathan Cameron via
2026-02-20 12:49   ` Michael S. Tsirkin
2026-02-20 13:53     ` Alireza Sanaee via
2026-02-20 13:53       ` Alireza Sanaee via qemu development
2026-01-06 15:58 ` [PATCH v17 7/8] tests/qtest/bios-table-test: testing new ARM ACPI PPTT topology Alireza Sanaee via
2026-01-06 15:58   ` Alireza Sanaee via
2026-01-06 15:58 ` [PATCH v17 8/8] Update the ACPI tables based on new aml-build.c Alireza Sanaee via
2026-01-06 15:58   ` Alireza Sanaee via

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=20260106161154.000067f7@huawei.com \
    --to=qemu-arm@nongnu.org \
    --cc=alireza.sanaee@huawei.com \
    --cc=anisinha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=eric.auger@redhat.com \
    --cc=farman@linux.ibm.com \
    --cc=gustavo.romero@linaro.org \
    --cc=imammedo@redhat.com \
    --cc=jiangkunkun@huawei.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linuxarm@huawei.com \
    --cc=maobibo@loongson.cn \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=yangyicong@hisilicon.com \
    --cc=zhao1.liu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.