svn commit: r315666 - stable/11/sys/dev/xen/timer
Roger Pau Monné
royger at FreeBSD.org
Tue Mar 21 08:34:42 UTC 2017
Author: royger
Date: Tue Mar 21 08:34:41 2017
New Revision: 315666
URL: https://svnweb.freebsd.org/changeset/base/315666
Log:
MFC r314094:
xen/timer: mark the Xen PV timer as not safe for suspension
Submitted by: Liuyingdong <liuyingdong at huawei.com>
Reviewed by: royger
Modified:
stable/11/sys/dev/xen/timer/timer.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/xen/timer/timer.c
==============================================================================
--- stable/11/sys/dev/xen/timer/timer.c Tue Mar 21 08:30:06 2017 (r315665)
+++ stable/11/sys/dev/xen/timer/timer.c Tue Mar 21 08:34:41 2017 (r315666)
@@ -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.
More information about the svn-src-stable
mailing list