On 12.10.2021 09:24, Dongli Zhang wrote:
> 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().
> 
> Cc: Joe Jin <[email protected]>
> Signed-off-by: Dongli Zhang <[email protected]>

While I agree with the change in principle, ...

> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -1695,6 +1695,8 @@ long do_vcpu_op(int cmd, unsigned int vcpuid, 
> XEN_GUEST_HANDLE_PARAM(void) arg)
>          rc = map_vcpu_info(v, info.mfn, info.offset);
>          domain_unlock(d);
>  
> +        force_update_vcpu_system_time(v);

... I'm afraid you're breaking the Arm build here. Arm will first need
to gain this function.

Jan


Reply via email to