From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org, Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Gavin Shan <gshan@redhat.com>,
linuxarm@huawei.com, James Morse <james.morse@arm.com>,
"peter . maydell @ linaro . org" <peter.maydell@linaro.org>,
zhao1.liu@linux.intel.com,
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>,
Yicong Yang <yangyicong@huawei.com>
Subject: Re: [RFC PATCH 2/5] HACK: target/arm/tcg: Add some more caches to cpu=max
Date: Mon, 14 Aug 2023 11:13:58 +0100 [thread overview]
Message-ID: <87y1ierkuh.fsf@linaro.org> (raw)
In-Reply-To: <20230808115713.2613-3-Jonathan.Cameron@huawei.com>
Jonathan Cameron <Jonathan.Cameron@huawei.com> writes:
> Used to drive the MPAM cache intialization and to exercise more
> of the PPTT cache entry generation code. Perhaps a default
> L3 cache is acceptable for max?
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
> target/arm/tcg/cpu64.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c
> index 8019f00bc3..2af67739f6 100644
> --- a/target/arm/tcg/cpu64.c
> +++ b/target/arm/tcg/cpu64.c
> @@ -711,6 +711,17 @@ void aarch64_max_tcg_initfn(Object *obj)
> uint64_t t;
> uint32_t u;
>
> + /*
> + * Expanded cache set
> + */
> + cpu->clidr = 0x8204923; /* 4 4 4 4 3 in 3 bit fields */
> + cpu->ccsidr[0] = 0x000000ff0000001aull; /* 64KB L1 dcache */
> + cpu->ccsidr[1] = 0x000000ff0000001aull; /* 64KB L1 icache */
> + cpu->ccsidr[2] = 0x000007ff0000003aull; /* 1MB L2 unified cache */
> + cpu->ccsidr[4] = 0x000007ff0000007cull; /* 2MB L3 cache 128B line */
> + cpu->ccsidr[6] = 0x00007fff0000007cull; /* 16MB L4 cache 128B line */
> + cpu->ccsidr[8] = 0x0007ffff0000007cull; /* 2048MB L5 cache 128B line */
> +
I think Peter in another thread wondered if we should have a generic
function for expanding the cache idr registers based on a abstract lane
definition.
> /*
> * Reset MIDR so the guest doesn't mistake our 'max' CPU type for a real
> * one and try to apply errata workarounds or use impdef features we
> @@ -828,6 +839,7 @@ void aarch64_max_tcg_initfn(Object *obj)
> t = FIELD_DP64(t, ID_AA64MMFR2, BBM, 2); /* FEAT_BBM at level 2 */
> t = FIELD_DP64(t, ID_AA64MMFR2, EVT, 2); /* FEAT_EVT */
> t = FIELD_DP64(t, ID_AA64MMFR2, E0PD, 1); /* FEAT_E0PD */
> + t = FIELD_DP64(t, ID_AA64MMFR2, CCIDX, 1); /* FEAT_TTCNP */
> cpu->isar.id_aa64mmfr2 = t;
>
> t = cpu->isar.id_aa64zfr0;
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2023-08-14 10:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 11:57 [RFC PATCH 0/5] hw/arm: MPAM Emulation + PPTT cache description Jonathan Cameron via
2023-08-08 11:57 ` [RFC PATCH 1/5] hw/acpi: Add PPTT cache descriptions Jonathan Cameron via
2023-08-14 9:50 ` Zhao Liu
2023-08-23 15:08 ` Jonathan Cameron via
2023-08-08 11:57 ` [RFC PATCH 2/5] HACK: target/arm/tcg: Add some more caches to cpu=max Jonathan Cameron via
2023-08-14 10:13 ` Alex Bennée [this message]
2023-08-23 14:59 ` Jonathan Cameron via
2023-08-23 19:05 ` Richard Henderson
2023-08-08 11:57 ` [RFC PATCH 3/5] target/arm: Add support for MPAM CPU registers Jonathan Cameron via
2023-08-08 11:57 ` [RFC PATCH 4/5] hw/arm: Add MPAM emulation Jonathan Cameron via
2023-08-08 11:57 ` [RFC PATCH 5/5] hw/arm/virt: Add MPAM MSCs for memory controllers and caches Jonathan Cameron 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=87y1ierkuh.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=gshan@redhat.com \
--cc=james.morse@arm.com \
--cc=linuxarm@huawei.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=yangyicong@huawei.com \
--cc=zhao1.liu@linux.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.