diff -r 227130622561 xen/common/domain.c --- a/xen/common/domain.c Thu Aug 25 12:03:14 2011 +0100 +++ b/xen/common/domain.c Wed Aug 31 23:05:31 2011 +0200 @@ -896,6 +896,7 @@ long do_vcpu_op(int cmd, int vcpuid, XEN case VCPUOP_set_singleshot_timer: { struct vcpu_set_singleshot_timer set; + s_time_t now; if ( v != current ) return -EINVAL; @@ -903,9 +904,12 @@ long do_vcpu_op(int cmd, int vcpuid, XEN if ( copy_from_guest(&set, arg, 1) ) return -EFAULT; + now = NOW(); if ( (set.flags & VCPU_SSHOTTMR_future) && - (set.timeout_abs_ns < NOW()) ) + (set.timeout_abs_ns < now) ) { + gdprintk(XENLOG_INFO, "VCPUOP_set_singleshot_timer: time in past: %lu < %ld\n", set.timeout_abs_ns, now); return -ETIME; + } migrate_timer(&v->singleshot_timer, smp_processor_id()); set_timer(&v->singleshot_timer, set.timeout_abs_ns);