mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target/ppc: make power8-pmu.c CONFIG_TCG only
This is an exclusive TCG helper. Gating it with CONFIG_TCG and changing meson.build accordingly will prevent problems --disable-tcg and --disable-linux-user later on. We're also changing the uses of !kvm_enabled() to tcg_enabled() to avoid adding "defined(CONFIG_TCG)" ifdefs, since tcg_enabled() will be defaulted to false with --disable-tcg and the block will always be skipped. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220225101140.1054160-2-danielhb413@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
parent
6e7b967503
commit
33edcde7c8
4 changed files with 16 additions and 14 deletions
|
@ -5698,12 +5698,10 @@ static void register_power9_mmu_sprs(CPUPPCState *env)
|
|||
*/
|
||||
static void init_tcg_pmu_power8(CPUPPCState *env)
|
||||
{
|
||||
#if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
|
||||
/* Init PMU overflow timers */
|
||||
if (!kvm_enabled()) {
|
||||
if (tcg_enabled()) {
|
||||
cpu_ppc_pmu_init(env);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void init_proc_book3s_common(CPUPPCState *env)
|
||||
|
@ -7167,14 +7165,14 @@ static void ppc_cpu_reset(DeviceState *dev)
|
|||
|
||||
#if !defined(CONFIG_USER_ONLY)
|
||||
env->nip = env->hreset_vector | env->excp_prefix;
|
||||
#if defined(CONFIG_TCG)
|
||||
if (env->mmu_model != POWERPC_MMU_REAL) {
|
||||
ppc_tlb_invalidate_all(env);
|
||||
}
|
||||
#endif /* CONFIG_TCG */
|
||||
#endif
|
||||
|
||||
pmu_update_summaries(env);
|
||||
if (tcg_enabled()) {
|
||||
if (env->mmu_model != POWERPC_MMU_REAL) {
|
||||
ppc_tlb_invalidate_all(env);
|
||||
}
|
||||
pmu_update_summaries(env);
|
||||
}
|
||||
#endif
|
||||
hreg_compute_hflags(env);
|
||||
env->reserve_addr = (target_ulong)-1ULL;
|
||||
/* Be sure no exception or interrupt is pending */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue