summaryrefslogtreecommitdiff
path: root/target/arm/kvm32.c
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2017-09-04 15:21:54 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-09-04 15:21:54 +0100
commitb2bfe9f7f1f7e3aa5edf9c3c4c7408082778ae17 (patch)
treec2630b47c2ac75da59e835987ca88230377a6006 /target/arm/kvm32.c
parentb16595275bc9b9ce6a36bfb0344d514ab77e6b98 (diff)
downloadqemu-b2bfe9f7f1f7e3aa5edf9c3c4c7408082778ae17.tar.gz
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>
Diffstat (limited to 'target/arm/kvm32.c')
-rw-r--r--target/arm/kvm32.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/target/arm/kvm32.c b/target/arm/kvm32.c
index e3aab89a1a..f925a21481 100644
--- a/target/arm/kvm32.c
+++ b/target/arm/kvm32.c
@@ -522,14 +522,12 @@ bool kvm_arm_hw_debug_active(CPUState *cs)
return false;
}
-int kvm_arm_pmu_set_irq(CPUState *cs, int irq)
+void kvm_arm_pmu_set_irq(CPUState *cs, int irq)
{
qemu_log_mask(LOG_UNIMP, "%s: not implemented\n", __func__);
- return 0;
}
-int kvm_arm_pmu_init(CPUState *cs)
+void kvm_arm_pmu_init(CPUState *cs)
{
qemu_log_mask(LOG_UNIMP, "%s: not implemented\n", __func__);
- return 0;
}