[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/7] target/arm/kvm: spe: Unify device attr operatioin helper
From: |
Haibo Xu |
Subject: |
[PATCH 4/7] target/arm/kvm: spe: Unify device attr operatioin helper |
Date: |
Fri, 7 Aug 2020 08:10:34 +0000 |
Rename kvm_arm_pmu_set_attr() to kvm_arm_dev_set_attr(),
So both the vPMU and vSPE device can share the same API.
Signed-off-by: Haibo Xu <haibo.xu@linaro.org>
---
target/arm/kvm64.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
index 1169237905..75a417d65c 100644
--- a/target/arm/kvm64.c
+++ b/target/arm/kvm64.c
@@ -398,7 +398,7 @@ static CPUWatchpoint *find_hw_watchpoint(CPUState *cpu,
target_ulong addr)
return NULL;
}
-static bool kvm_arm_pmu_set_attr(CPUState *cs, struct kvm_device_attr *attr)
+static bool kvm_arm_dev_set_attr(CPUState *cs, struct kvm_device_attr *attr)
{
int err;
@@ -427,7 +427,7 @@ void kvm_arm_pmu_init(CPUState *cs)
if (!ARM_CPU(cs)->has_pmu) {
return;
}
- if (!kvm_arm_pmu_set_attr(cs, &attr)) {
+ if (!kvm_arm_dev_set_attr(cs, &attr)) {
error_report("failed to init PMU");
abort();
}
@@ -444,7 +444,7 @@ void kvm_arm_pmu_set_irq(CPUState *cs, int irq)
if (!ARM_CPU(cs)->has_pmu) {
return;
}
- if (!kvm_arm_pmu_set_attr(cs, &attr)) {
+ if (!kvm_arm_dev_set_attr(cs, &attr)) {
error_report("failed to set irq for PMU");
abort();
}
--
2.17.1
[PATCH 2/7] target/arm/kvm: spe: Add helper to detect SPE when using KVM, Haibo Xu, 2020/08/07
[PATCH 5/7] target/arm/kvm: spe: Add device init and set_irq operations, Haibo Xu, 2020/08/07
[PATCH 6/7] hw/arm/virt: spe: Add SPE fdt binding for virt machine, Haibo Xu, 2020/08/07