]> xenbits.xensource.com Git - xen.git/commit
update system time immediately when VCPUOP_register_vcpu_info
authorDongli Zhang <dongli.zhang@oracle.com>
Wed, 3 Nov 2021 09:19:06 +0000 (10:19 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 3 Nov 2021 09:19:06 +0000 (10:19 +0100)
commitb67f09721f136cc3a9afcb6a82466d1bd27aa6c0
tree8db1efe237adc7a7f4f5287f7e08ca5a5bb30418
parente41a5bae01f08f7084cb5668d9922b498edbc403
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>
xen/arch/arm/time.c
xen/common/domain.c
xen/include/asm-arm/time.h