From owner-cvs-src-old@FreeBSD.ORG Fri May 29 13:43:38 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB4CB10656C1 for ; Fri, 29 May 2009 13:43:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 98AE48FC13 for ; Fri, 29 May 2009 13:43:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n4TDhcST046444 for ; Fri, 29 May 2009 13:43:38 GMT (envelope-from adrian@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n4TDhcTL046443 for cvs-src-old@freebsd.org; Fri, 29 May 2009 13:43:38 GMT (envelope-from adrian@repoman.freebsd.org) Message-Id: <200905291343.n4TDhcTL046443@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to adrian@repoman.freebsd.org using -f From: Adrian Chadd Date: Fri, 29 May 2009 13:43:21 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/i386/xen clock.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2009 13:43:38 -0000 adrian 2009-05-29 13:43:21 UTC FreeBSD src repository Modified files: sys/i386/xen clock.c Log: SVN rev 193033 on 2009-05-29 13:43:21Z by adrian Fix the Xen TOD update when the hypervisor wall clock is nudged. The "wall clock" in the current code is actually the hypervisor start time. The time of day is the "start time" plus the hypervisor "uptime". Large enough bumps in the dom0 clock lead to a hypervisor "bump" which is implemented as a bump in the start time, not the uptime. The clock.c routines were reading in the hypervisor start time and then using this as the TOD. This meant that any hypervisor time bump would cause the FreeBSD DomU to set its TOD to the hypervisor start time, rather than the actual TOD. This fix is a bit hacky and some reshuffling should be done later on to clarify what is going on. I've left the wall clock code alone. (The code which updates shadow_tv and shadow_tv_version.) A new routine adds the uptime to the shadow_tv, which is then used to update the TOD. I've included some debugging so it is obvious when the clock is nudged. PR: 135008 Revision Changes Path 1.11 +14 -0 src/sys/i386/xen/clock.c