summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/lapic.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-10-08 10:55:03 -0300
committerMarcelo Tosatti <mtosatti@redhat.com>2009-10-16 12:30:25 -0300
commitace1546487a0fe4634e3251067f8a32cb2cdc099 (patch)
tree6f7ac8a23d0ac1ae5af287916cdd356de114f877 /arch/x86/kvm/lapic.c
parent012abeea669ea49636cf952d13298bb68654146a (diff)
downloadop-kernel-dev-ace1546487a0fe4634e3251067f8a32cb2cdc099.zip
op-kernel-dev-ace1546487a0fe4634e3251067f8a32cb2cdc099.tar.gz
KVM: use proper hrtimer function to retrieve expiration time
hrtimer->base can be temporarily NULL due to racing hrtimer_start. See switch_hrtimer_base/lock_hrtimer_base. Use hrtimer_get_remaining which is robust against it. CC: stable@kernel.org Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r--arch/x86/kvm/lapic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 7024224..23c2176 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -521,7 +521,7 @@ static u32 apic_get_tmcct(struct kvm_lapic *apic)
if (apic_get_reg(apic, APIC_TMICT) == 0)
return 0;
- remaining = hrtimer_expires_remaining(&apic->lapic_timer.timer);
+ remaining = hrtimer_get_remaining(&apic->lapic_timer.timer);
if (ktime_to_ns(remaining) < 0)
remaining = ktime_set(0, 0);
OpenPOWER on IntegriCloud