[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/5] hw/mips/malta: Do not initialize MT registers if MT ASE abse
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 4/5] hw/mips/malta: Do not initialize MT registers if MT ASE absent |
Date: |
Fri, 4 Dec 2020 23:26:21 +0100 |
Do not initialize MT-related config register if the MT ASE
is not present.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/mips/malta.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 9d1a3b50b7a..350b92b4d79 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1134,8 +1134,10 @@ static void malta_mips_config(MIPSCPU *cpu)
CPUMIPSState *env = &cpu->env;
CPUState *cs = CPU(cpu);
- env->mvp->CP0_MVPConf0 |= ((smp_cpus - 1) << CP0MVPC0_PVPE) |
+ if (ase_mt_available(env)) {
+ env->mvp->CP0_MVPConf0 |= ((smp_cpus - 1) << CP0MVPC0_PVPE) |
((smp_cpus * cs->nr_threads - 1) << CP0MVPC0_PTC);
+ }
}
static void main_cpu_reset(void *opaque)
--
2.26.2
- [PATCH 0/5] mips: Sanitize Multi-Threading ASE, Philippe Mathieu-Daudé, 2020/12/04
- [PATCH 1/5] target/mips: Remove mips_def_t unused argument from mvp_init(), Philippe Mathieu-Daudé, 2020/12/04
- [PATCH 2/5] target/mips: Introduce ase_mt_available() helper, Philippe Mathieu-Daudé, 2020/12/04
- [PATCH 3/5] target/mips: Do not initialize MT registers if MT ASE absent, Philippe Mathieu-Daudé, 2020/12/04
- [PATCH 5/5] hw/mips/malta: Rewrite CP0_MVPConf0 access using deposit(), Philippe Mathieu-Daudé, 2020/12/04
- [PATCH 4/5] hw/mips/malta: Do not initialize MT registers if MT ASE absent,
Philippe Mathieu-Daudé <=
- Re: [PATCH 0/5] mips: Sanitize Multi-Threading ASE, Philippe Mathieu-Daudé, 2020/12/07