diff options
author | Dongli Zhang <dongli.zhang@oracle.com> | 2021-11-03 10:19:06 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-11-03 10:19:06 +0100 |
commit | b67f09721f136cc3a9afcb6a82466d1bd27aa6c0 (patch) | |
tree | 8db1efe237adc7a7f4f5287f7e08ca5a5bb30418 /xen/include | |
parent | e41a5bae01f08f7084cb5668d9922b498edbc403 (diff) |
update system time immediately when VCPUOP_register_vcpu_info
The guest may access the pv vcpu_time_info immediately after
VCPUOP_register_vcpu_info. This is to borrow the idea of
VCPUOP_register_vcpu_time_memory_area, where the
force_update_vcpu_system_time() is called immediately when the new memory
area is registered.
Otherwise, we may observe clock drift at the VM side if the VM accesses
the clocksource immediately after VCPUOP_register_vcpu_info().
Reference: https://lists.xenproject.org/archives/html/xen-devel/2021-10/msg00571.html
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
Diffstat (limited to 'xen/include')
-rw-r--r-- | xen/include/asm-arm/time.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/include/asm-arm/time.h b/xen/include/asm-arm/time.h index 6b8fd839dd..4b401c1110 100644 --- a/xen/include/asm-arm/time.h +++ b/xen/include/asm-arm/time.h @@ -105,6 +105,8 @@ extern uint64_t ns_to_ticks(s_time_t ns); void preinit_xen_time(void); +void force_update_vcpu_system_time(struct vcpu *v); + #endif /* __ARM_TIME_H__ */ /* * Local variables: |