From: Keir Fraser Date: Tue, 15 Jul 2008 16:56:25 +0000 (+0100) Subject: x86: No need to vcpu_update_system_time() on map_vcpu_info(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14188^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=991ead8fa2da51235a7e8430cdc41985656d6380;p=xen.git x86: No need to vcpu_update_system_time() on map_vcpu_info(). Also, ensure update_vcpu_system_time() triggers at least once for any given vcpu, even if the TSC stamp is zero. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 38775ab972..32a7d4b662 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -286,6 +286,10 @@ int vcpu_initialise(struct vcpu *v) v->arch.flags = TF_kernel_mode; + /* Ensure that update_vcpu_system_time() fires at least once. */ + if ( !is_idle_domain(d) ) + vcpu_info(v, time).tsc_timestamp = ~0ull; + #if defined(__i386__) mapcache_vcpu_init(v); #endif @@ -812,14 +816,6 @@ map_vcpu_info(struct vcpu *v, unsigned long mfn, unsigned offset) for ( i = 0; i < BITS_PER_GUEST_LONG(d); i++ ) set_bit(i, &vcpu_info(v, evtchn_pending_sel)); - /* - * Only bother to update time for the current vcpu. If we're - * operating on another vcpu, then it had better not be running at - * the time. - */ - if ( v == current ) - update_vcpu_system_time(v); - return 0; }