]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: s390: base hrtimer on a monotonic clock
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Fri, 12 Dec 2014 14:17:31 +0000 (15:17 +0100)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 24 Feb 2015 10:01:08 +0000 (10:01 +0000)
commit 0ac96caf0f9381088c673a16d910b1d329670edf upstream.

The hrtimer that handles the wait with enabled timer interrupts
should not be disturbed by changes of the host time.

This patch changes our hrtimer to be based on a monotonic clock.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
arch/s390/kvm/kvm-s390.c

index 0eaf87281f4575c7085ab82c994910e38e946144..5e9217d96cfec970502157d1eda7f2bafcd9e0c0 100644 (file)
@@ -646,7 +646,7 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
                if (rc)
                        return rc;
        }
-       hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
+       hrtimer_init(&vcpu->arch.ckc_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
        tasklet_init(&vcpu->arch.tasklet, kvm_s390_tasklet,
                     (unsigned long) vcpu);
        vcpu->arch.ckc_timer.function = kvm_s390_idle_wakeup;