From owner-freebsd-current@FreeBSD.ORG Tue Dec 24 15:51:07 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4162FB63; Tue, 24 Dec 2013 15:51:07 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 142351AC9; Tue, 24 Dec 2013 15:51:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 07B23B995; Tue, 24 Dec 2013 10:51:06 -0500 (EST) From: John Baldwin To: Roger Pau Monne Subject: Re: [PATCH v7 06/19] xen: implement an early timer for Xen PVH Date: Tue, 24 Dec 2013 10:17:52 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1387479296-33389-1-git-send-email-roger.pau@citrix.com> <1387479296-33389-7-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387479296-33389-7-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201312241017.52700.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 24 Dec 2013 10:51:06 -0500 (EST) Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Dec 2013 15:51:07 -0000 On Thursday, December 19, 2013 1:54:43 pm Roger Pau Monne wrote: > When running as a PVH guest, there's no emulated i8254, so we need to > use the Xen PV timer as the early source for DELAY. This change allows > for different implementations of the early DELAY function and > implements a Xen variant for it. This mostly looks good to me. I would perhaps move DELAY() itself into delay.c if it isn't too ugly to do so. I guess it would look something like: #if !(defined(__i386__) && defined(XEN)) void DELAY(int n) { if (delay_tc(n)) return; #ifdef __amd64__ init_ops.early_delay(n); #else i8254_delay(n); } #endif This would let you leave delay_tc() private to delay.c. -- John Baldwin