From owner-svn-src-stable@freebsd.org Tue Mar 21 08:34:42 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E918D16CB3; Tue, 21 Mar 2017 08:34:42 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D9BC149A; Tue, 21 Mar 2017 08:34:42 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2L8YfMu005908; Tue, 21 Mar 2017 08:34:41 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2L8YfCD005907; Tue, 21 Mar 2017 08:34:41 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201703210834.v2L8YfCD005907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 21 Mar 2017 08:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r315666 - stable/11/sys/dev/xen/timer X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Mar 2017 08:34:42 -0000 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 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.