[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v1 32/38] target/arm: cpu: do not initialize TCG PMU for KVM
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC v1 32/38] target/arm: cpu: do not initialize TCG PMU for KVM |
Date: |
Sun, 21 Feb 2021 10:53:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 2/21/21 10:24 AM, Claudio Fontana wrote:
> From: Claudio Fontana <cfontana@centriq4.arch.suse.de>
>
> KVM uses its own PMU initialization.
>
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> ---
> target/arm/cpu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index a8321fecf8..d334987cad 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -1648,6 +1648,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error
> **errp)
> unset_feature(env, ARM_FEATURE_PMU);
> }
> if (arm_feature(env, ARM_FEATURE_PMU)) {
> +#ifdef CONFIG_TCG
Shouldn't this be #if !defined(CONFIG_KVM) ?
> pmu_init(cpu);
>
> if (!kvm_enabled()) {
And remove this ^
> @@ -1659,6 +1660,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error
> **errp)
> cpu->pmu_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, arm_pmu_timer_cb,
> cpu);
> #endif
> +#endif /* CONFIG_TCG */
> } else {
> cpu->isar.id_aa64dfr0 =
> FIELD_DP64(cpu->isar.id_aa64dfr0, ID_AA64DFR0, PMUVER, 0);
>
- Re: [RFC v1 32/38] target/arm: cpu: do not initialize TCG PMU for KVM,
Philippe Mathieu-Daudé <=