* [PATCH v2] target/arm: update the cortex-a15 MIDR to latest rev
@ 2022-10-10 15:32 Alex Bennée
2022-10-14 18:02 ` Peter Maydell
0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2022-10-10 15:32 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Alex Bennée, Arnd Bergmann, Anders Roxell,
Philippe Mathieu-Daudé, Peter Maydell
QEMU doesn't model micro-architectural details which includes most
chip errata. The ARM_ERRATA_798181 work around in the Linux
kernel (see erratum_a15_798181_init) currently detects QEMU's
cortex-a15 as broken and triggers additional expensive TLB flushes as
a result.
Change the MIDR to report what the latest silicon would (r4p0). We
explicitly set the IMPDEF revidr bits to 0 because we don't need to
set anything other than the silicon revision to indicate these flushes
are not needed. This cuts about 5s from my Debian kernel boot with the
latest 6.0rc1 kernel (29s->24s).
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Arnd Bergmann <arnd@linaro.org>
Cc: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Message-Id: <20220906172257.2776521-1-alex.bennee@linaro.org>
---
v2
- set revdir=0 instead of 0x200, update commit message
---
target/arm/cpu_tcg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/arm/cpu_tcg.c b/target/arm/cpu_tcg.c
index 98b5ba2160..60ff539fa1 100644
--- a/target/arm/cpu_tcg.c
+++ b/target/arm/cpu_tcg.c
@@ -592,7 +592,9 @@ static void cortex_a15_initfn(Object *obj)
set_feature(&cpu->env, ARM_FEATURE_EL3);
set_feature(&cpu->env, ARM_FEATURE_PMU);
cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A15;
- cpu->midr = 0x412fc0f1;
+ /* r4p0 cpu, not requiring expensive tlb flush errata */
+ cpu->midr = 0x414fc0f0;
+ cpu->revidr = 0x0;
cpu->reset_fpsid = 0x410430f0;
cpu->isar.mvfr0 = 0x10110222;
cpu->isar.mvfr1 = 0x11111111;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] target/arm: update the cortex-a15 MIDR to latest rev
2022-10-10 15:32 [PATCH v2] target/arm: update the cortex-a15 MIDR to latest rev Alex Bennée
@ 2022-10-14 18:02 ` Peter Maydell
0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2022-10-14 18:02 UTC (permalink / raw)
To: Alex Bennée
Cc: qemu-devel, qemu-arm, Arnd Bergmann, Anders Roxell,
Philippe Mathieu-Daudé
On Mon, 10 Oct 2022 at 16:32, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> QEMU doesn't model micro-architectural details which includes most
> chip errata. The ARM_ERRATA_798181 work around in the Linux
> kernel (see erratum_a15_798181_init) currently detects QEMU's
> cortex-a15 as broken and triggers additional expensive TLB flushes as
> a result.
>
> Change the MIDR to report what the latest silicon would (r4p0). We
> explicitly set the IMPDEF revidr bits to 0 because we don't need to
> set anything other than the silicon revision to indicate these flushes
> are not needed. This cuts about 5s from my Debian kernel boot with the
> latest 6.0rc1 kernel (29s->24s).
Applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-14 18:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-10 15:32 [PATCH v2] target/arm: update the cortex-a15 MIDR to latest rev Alex Bennée
2022-10-14 18:02 ` Peter Maydell
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).