[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2] target/arm/cpu: adjust virtual time for arm cpu
From: |
Ying Fang |
Subject: |
[PATCH v2] target/arm/cpu: adjust virtual time for arm cpu |
Date: |
Wed, 3 Jun 2020 10:02:08 +0800 |
Virtual time adjustment was implemented for virt-5.0 machine type,
but the cpu property was enabled only for host-passthrough and
max cpu model. Let's add it for arm cpu which has the gernic
timer feature enabled.
Signed-off-by: Ying Fang <fangying1@huawei.com>
---
v2:
- move kvm_arm_add_vcpu_properties into arm_cpu_post_init
v1:
- initial commit
- https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg08518.html
---
target/arm/cpu.c | 3 +--
target/arm/cpu64.c | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 32bec156f2..1e9b7a51f2 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -1244,6 +1244,7 @@ void arm_cpu_post_init(Object *obj)
if (arm_feature(&cpu->env, ARM_FEATURE_GENERIC_TIMER)) {
qdev_property_add_static(DEVICE(cpu), &arm_cpu_gt_cntfrq_property);
+ kvm_arm_add_vcpu_properties(obj);
}
}
@@ -2029,7 +2030,6 @@ static void arm_max_initfn(Object *obj)
if (kvm_enabled()) {
kvm_arm_set_cpu_features_from_host(cpu);
- kvm_arm_add_vcpu_properties(obj);
} else {
cortex_a15_initfn(obj);
@@ -2183,7 +2183,6 @@ static void arm_host_initfn(Object *obj)
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
aarch64_add_sve_properties(obj);
}
- kvm_arm_add_vcpu_properties(obj);
arm_cpu_post_init(obj);
}
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index cbc5c3868f..778cecc2e6 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -592,7 +592,6 @@ static void aarch64_max_initfn(Object *obj)
if (kvm_enabled()) {
kvm_arm_set_cpu_features_from_host(cpu);
- kvm_arm_add_vcpu_properties(obj);
} else {
uint64_t t;
uint32_t u;
--
2.23.0
- [PATCH v2] target/arm/cpu: adjust virtual time for arm cpu,
Ying Fang <=