KVM: use proper hrtimer function to retrieve expiration time
commitc66415b2216cebf6625a2ab01c347a2fc329671a
authorMarcelo Tosatti <mtosatti@redhat.com>
Thu, 8 Oct 2009 13:55:03 +0000 (8 10:55 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Nov 2009 00:21:49 +0000 (9 16:21 -0800)
tree00a7cd42ac5b4a24bda7af05e5d268152c2fb8c7
parent9c367e53d2780b5131baecd1874835ce8ddc4ed0
KVM: use proper hrtimer function to retrieve expiration time

commit ace1546487a0fe4634e3251067f8a32cb2cdc099 upstream.

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.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/i8254.c
arch/x86/kvm/lapic.c