aboutsummaryrefslogtreecommitdiff
path: root/target/arm/cpu.c
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2020-10-01 08:17:18 +0200
committerPeter Maydell <peter.maydell@linaro.org>2020-10-08 15:24:32 +0100
commit68970d1e0d07e3a266141bbd9038fd9890ca88f2 (patch)
treed63c836446b8badc5006aa9ce76ca90cb2ef16c5 /target/arm/cpu.c
parent05889d15d1c95163de917800cf0e1bf6faab1bc7 (diff)
hw/arm/virt: Implement kvm-steal-time
We add the kvm-steal-time CPU property and implement it for machvirt. A tiny bit of refactoring was also done to allow pmu and pvtime to use the same vcpu device helper functions. Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Andrew Jones <drjones@redhat.com> Message-id: 20201001061718.101915-7-drjones@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/cpu.c')
-rw-r--r--target/arm/cpu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 858c5a4bcb..056319859f 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1310,6 +1310,14 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp)
return;
}
}
+
+ if (kvm_enabled()) {
+ kvm_arm_steal_time_finalize(cpu, &local_err);
+ if (local_err != NULL) {
+ error_propagate(errp, local_err);
+ return;
+ }
+ }
}
static void arm_cpu_realizefn(DeviceState *dev, Error **errp)