]> git.baikalelectronics.ru Git - kernel.git/commit
xen/x86: Do not call xen_init_time_ops() until shared_info is initialized
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 3 May 2017 20:20:51 +0000 (16:20 -0400)
committerJuergen Gross <jgross@suse.com>
Fri, 5 May 2017 08:43:15 +0000 (10:43 +0200)
commit2651c29f2b75877d78b25f2693352269cebe14f5
tree3305107f1087882cb77f1db1c713cdfe24a44154
parent4ffa597f307a3a44b794488b51212f99e443cc93
xen/x86: Do not call xen_init_time_ops() until shared_info is initialized

Routines that are set by xen_init_time_ops() use shared_info's
pvclock_vcpu_time_info area. This area is not properly available until
shared_info is mapped in xen_setup_shared_info().

This became especially problematic due to commit b438409b50c5 ("x86/timers:
Add simple udelay calibration") where we end up reading tsc_to_system_mul
from xen_dummy_shared_info (i.e. getting zero value) and then trying
to divide by it in pvclock_tsc_khz().

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/xen/enlighten_pv.c
arch/x86/xen/time.c