Skip to contentSkip to conversation

mips: kvm: do not use get_clock()

PATCH In review Paolo Bonzini 2 participants 2 messages Nov 26, 2014 – Nov 27, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mips: kvm: do not use get_clock()

Use the external qemu-timer API instead.

---
 target-mips/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-mips/kvm.c +1 -1
index 97fd51a..a761ea5 100644
@@ -439,7 +439,7 @@ static void kvm_mips_update_state(void *opaque, int running, RunState state)
         }
     } else {
         /* Set clock restore time to now */
-        count_resume = get_clock();
+        count_resume = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);
         ret = kvm_mips_put_one_reg64(cs, KVM_REG_MIPS_COUNT_RESUME,
                                      &count_resume);
         if (ret < 0) {
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Paolo Bonzini

Use the external qemu-timer API instead.

Thanks
James

Quoted 18 lines
---
 target-mips/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-mips/kvm.c +1 -1
index 97fd51a..a761ea5 100644
@@ -439,7 +439,7 @@ static void kvm_mips_update_state(void *opaque, int running, RunState state)
         }
     } else {
         /* Set clock restore time to now */
-        count_resume = get_clock();
+        count_resume = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);
         ret = kvm_mips_put_one_reg64(cs, KVM_REG_MIPS_COUNT_RESUME,
                                      &count_resume);
         if (ret < 0) {