Projects
home:dongzhihai
qemu
_service:tar_scm:arm-cpu-Some-fixes-for-arm_cpu...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:arm-cpu-Some-fixes-for-arm_cpu_unrealizefn.patch of Package qemu
From b394996c99c0af0de870a5d79fff69f01d504b0c Mon Sep 17 00:00:00 2001 From: Keqian Zhu <zhukeqian1@huawei.com> Date: Tue, 26 Mar 2024 14:47:07 +0800 Subject: [PATCH] arm/cpu: Some fixes for arm_cpu_unrealizefn() Some minor fixes for arm_cpu_unrealizefn(). Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com> --- target/arm/cpu.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 501f88eb2f..9dd61c10ea 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2418,6 +2418,7 @@ static void arm_cpu_unrealizefn(DeviceState *dev) CPUState *cs = CPU(dev); bool has_secure; +#ifndef CONFIG_USER_ONLY has_secure = cpu->has_el3 || arm_feature(env, ARM_FEATURE_M_SECURITY); /* rock 'n' un-roll, whatever happened in the arm_cpu_realizefn cleanly */ @@ -2433,30 +2434,38 @@ static void arm_cpu_unrealizefn(DeviceState *dev) if (has_secure) { cpu_address_space_destroy(cs, ARMASIdx_S); } +#endif destroy_cpreg_list(cpu); arm_cpu_unregister_gdb_regs(cpu); unregister_cp_regs_for_features(cpu); +#ifndef CONFIG_USER_ONLY + if (tcg_enabled() && cpu_isar_feature(aa64_rme, cpu)) { + arm_unregister_el_change_hooks(cpu); + } +#endif + if (cpu->sau_sregion && arm_feature(env, ARM_FEATURE_M_SECURITY)) { g_free(env->sau.rbar); g_free(env->sau.rlar); } if (arm_feature(env, ARM_FEATURE_PMSA) && - arm_feature(env, ARM_FEATURE_V7) && - cpu->pmsav7_dregion) { - if (arm_feature(env, ARM_FEATURE_V8)) { - g_free(env->pmsav8.rbar[M_REG_NS]); - g_free(env->pmsav8.rlar[M_REG_NS]); - if (arm_feature(env, ARM_FEATURE_M_SECURITY)) { - g_free(env->pmsav8.rbar[M_REG_S]); - g_free(env->pmsav8.rlar[M_REG_S]); + arm_feature(env, ARM_FEATURE_V7)) { + if (cpu->pmsav7_dregion) { + if (arm_feature(env, ARM_FEATURE_V8)) { + g_free(env->pmsav8.rbar[M_REG_NS]); + g_free(env->pmsav8.rlar[M_REG_NS]); + if (arm_feature(env, ARM_FEATURE_M_SECURITY)) { + g_free(env->pmsav8.rbar[M_REG_S]); + g_free(env->pmsav8.rlar[M_REG_S]); + } + } else { + g_free(env->pmsav7.drbar); + g_free(env->pmsav7.drsr); + g_free(env->pmsav7.dracr); } - } else { - g_free(env->pmsav7.drbar); - g_free(env->pmsav7.drsr); - g_free(env->pmsav7.dracr); } if (cpu->pmsav8r_hdregion) { g_free(env->pmsav8.hprbar); -- 2.27.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2