*/
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)
#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);
+
+ if (tcg_enabled()) {
+ if (env->mmu_model != POWERPC_MMU_REAL) {
+ ppc_tlb_invalidate_all(env);
+ }
+ pmu_update_summaries(env);
}
-#endif /* CONFIG_TCG */
#endif
-
- pmu_update_summaries(env);
hreg_compute_hflags(env);
env->reserve_addr = (target_ulong)-1ULL;
/* Be sure no exception or interrupt is pending */
#include "cpu.h"
#include "exec/exec-all.h"
#include "sysemu/kvm.h"
+#include "sysemu/tcg.h"
#include "helper_regs.h"
#include "mmu-hash64.h"
#include "migration/cpu.h"
*/
env->msr ^= env->msr_mask & ~((1ULL << MSR_TGPR) | MSR_HVB);
ppc_store_msr(env, msr);
- pmu_update_summaries(env);
+
+ if (tcg_enabled()) {
+ pmu_update_summaries(env);
+ }
}
static int get_avr(QEMUFile *f, void *pv, size_t size,
#ifndef POWER8_PMU
#define POWER8_PMU
-void cpu_ppc_pmu_init(CPUPPCState *env);
-
#if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
+void cpu_ppc_pmu_init(CPUPPCState *env);
void pmu_update_summaries(CPUPPCState *env);
#else
+static inline void cpu_ppc_pmu_init(CPUPPCState *env) { }
static inline void pmu_update_summaries(CPUPPCState *env) { }
#endif