Date: Wed, 22 Feb 2017 09:22:18 +0000 (UTC) From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314094 - head/sys/dev/xen/timer Message-ID: <201702220922.v1M9MIeT077282@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: royger Date: Wed Feb 22 09:22:17 2017 New Revision: 314094 URL: https://svnweb.freebsd.org/changeset/base/314094 Log: xen/timer: mark the Xen PV timer as not safe for suspension Note that the timer itself fully supports suspension, but due to the lack of ordering during the resume process FreeBSD cannot guarantee that the timer is resumed before any device attempts to use it. Submitted by: Liuyingdong <liuyingdong@huawei.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D9639 Modified: head/sys/dev/xen/timer/timer.c Modified: head/sys/dev/xen/timer/timer.c ============================================================================== --- head/sys/dev/xen/timer/timer.c Wed Feb 22 08:49:52 2017 (r314093) +++ head/sys/dev/xen/timer/timer.c Wed Feb 22 09:22:17 2017 (r314094) @@ -417,8 +417,20 @@ xentimer_attach(device_t dev) /* Register the timecounter. */ sc->tc.tc_name = "XENTIMER"; sc->tc.tc_quality = XENTIMER_QUALITY; - sc->tc.tc_flags = TC_FLAGS_SUSPEND_SAFE; /* + * FIXME: due to the lack of ordering during resume, FreeBSD cannot + * guarantee that the Xen PV timer is resumed before any other device + * attempts to make use of it, so mark it as not safe for suspension + * (ie: remove the TC_FLAGS_SUSPEND_SAFE flag). + * + * NB: This was not a problem in previous FreeBSD versions because the + * timer was directly attached to the nexus, but it is an issue now + * that the timer is attached to the xenpv bus, and thus resumed + * later. + * + * sc->tc.tc_flags = TC_FLAGS_SUSPEND_SAFE; + */ + /* * The underlying resolution is in nanoseconds, since the timer info * scales TSC frequencies using a fraction that represents time in * terms of nanoseconds.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702220922.v1M9MIeT077282>