qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] target/arm/cpu: adjust virtual time for arm cpu
@ 2020-06-03  2:02 Ying Fang
  2020-06-03  2:09 ` Richard Henderson
  2020-06-03  8:26 ` Andrew Jones
  0 siblings, 2 replies; 5+ messages in thread
From: Ying Fang @ 2020-06-03  2:02 UTC (permalink / raw)
  To: drjones, qemu-devel, qemu-arm
  Cc: peter.maydell, zhang.zhanghailiang, wu.wubin

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




^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-04  7:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-03  2:02 [PATCH v2] target/arm/cpu: adjust virtual time for arm cpu Ying Fang
2020-06-03  2:09 ` Richard Henderson
2020-06-03  8:26 ` Andrew Jones
2020-06-03 14:23   ` Peter Maydell
2020-06-04  7:16   ` Ying Fang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).