mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
target/arm/kvm: pmu: improve error handling
If a KVM PMU init or set-irq attr call fails we just silently stop the PMU DT node generation. The only way they could fail, though, is if the attr's respective KVM has-attr call fails. But that should never happen if KVM advertises the PMU capability, because both attrs have been available since the capability was introduced. Let's just abort if this should-never-happen stuff does happen, because, if it does, then something is obviously horribly wrong. Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Christoffer Dall <cdall@linaro.org> Message-id: 1500471597-2517-5-git-send-email-drjones@redhat.com [PMM: change kvm32.c kvm_arm_pmu_init() to the new API too] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b16595275b
commit
b2bfe9f7f1
4 changed files with 29 additions and 29 deletions
|
@ -195,8 +195,8 @@ int kvm_arm_sync_mpstate_to_qemu(ARMCPU *cpu);
|
|||
|
||||
int kvm_arm_vgic_probe(void);
|
||||
|
||||
int kvm_arm_pmu_set_irq(CPUState *cs, int irq);
|
||||
int kvm_arm_pmu_init(CPUState *cs);
|
||||
void kvm_arm_pmu_set_irq(CPUState *cs, int irq);
|
||||
void kvm_arm_pmu_init(CPUState *cs);
|
||||
|
||||
#else
|
||||
|
||||
|
@ -205,15 +205,8 @@ static inline int kvm_arm_vgic_probe(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int kvm_arm_pmu_set_irq(CPUState *cs, int irq)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int kvm_arm_pmu_init(CPUState *cs)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void kvm_arm_pmu_set_irq(CPUState *cs, int irq) {}
|
||||
static inline void kvm_arm_pmu_init(CPUState *cs) {}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue