From owner-freebsd-xen@FreeBSD.ORG Sun May 24 03:26:30 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E950D106564A; Sun, 24 May 2009 03:26:30 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id 8BDCC8FC0A; Sun, 24 May 2009 03:26:30 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 3so1416357qwe.7 for ; Sat, 23 May 2009 20:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Grg4/cC1CDCIdCUCG2JGcPCeR/lNAMfpjgxnsVrBqoc=; b=VauQwF9JLbMI+n+1/JmKnqMbuHaU9hTsmqFH0nHF9dTno+A26YevHqLtFF/ksYn7mm m9HJ/8phRREZXu0/Onym26WvQAfc5yxObwg1Naq8KAywBsMEO8dDn0c76DJn01h2hlbn oI1rN+HdurrdRmBkP6+N4zOgXsEubtb5u/ZdE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; b=XaZb5Xt5D3NTg1V3erTSWt8zRU3dIURr4E/cV0h/a1DzS7BCjhnOHnJmr6ms+i7LcP SFbz/hzfm6AMLEApITprvKbUvkD4WzgFcfX0ed9CCmZ/9uy/FNBz+L6osCfeKHdqWuEL kg8BHbBrugpIYcW5iu0YroGi5QlxfGxUxCquw= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.80.21 with SMTP id r21mr1827393qck.80.1243135589998; Sat, 23 May 2009 20:26:29 -0700 (PDT) Date: Sun, 24 May 2009 11:26:29 +0800 X-Google-Sender-Auth: 762879009c508f53 Message-ID: From: Adrian Chadd To: freebsd-current Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-xen@freebsd.org Subject: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 03:26:31 -0000 G'day, I'd like to twiddle the Xen console stuff a little bit to make it easier to bootstrap a PVM. There's a couple of options I can think of: * Patch /etc/ttys to have a default "xc0" Xen console, but disabled (which makes it trivial for users / scripts to disable the syscons console and enable the xc console); * Modify the xenconsole driver to attach to ttyv0 (via a kernel environment variable) so /etc/ttys doesn't need modifying (but this may confuse tools that assumes /dev/ttyvX == syscons.) Opinions? I'd like to sneak in one of these before the release process begins for 8.0. Thanks, Adrian From owner-freebsd-xen@FreeBSD.ORG Sun May 24 04:50:46 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF497106564A; Sun, 24 May 2009 04:50:46 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 648388FC13; Sun, 24 May 2009 04:50:46 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n4O4GDG3095629; Sat, 23 May 2009 22:16:13 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4A18CA0D.6050805@samsco.org> Date: Sat, 23 May 2009 22:16:13 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Adrian Chadd References: In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-xen@freebsd.org, freebsd-current Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 04:50:46 -0000 Adrian Chadd wrote: > G'day, > > I'd like to twiddle the Xen console stuff a little bit to make it > easier to bootstrap a PVM. > > There's a couple of options I can think of: > > * Patch /etc/ttys to have a default "xc0" Xen console, but disabled > (which makes it trivial for users / scripts to disable the syscons > console and enable the xc console); > * Modify the xenconsole driver to attach to ttyv0 (via a kernel > environment variable) so /etc/ttys doesn't need modifying (but this > may confuse tools that assumes /dev/ttyvX == syscons.) > > Opinions? I'd like to sneak in one of these before the release process > begins for 8.0. > > Thanks, Treat xen as a new platform and have a src/etc/etc.xen directory that holds the xen-specific ttys files, along with similar things that it'll likely need. Scott From owner-freebsd-xen@FreeBSD.ORG Sun May 24 09:14:38 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62E871065675; Sun, 24 May 2009 09:14:38 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 00B988FC15; Sun, 24 May 2009 09:14:37 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id C59E21CCFF; Sun, 24 May 2009 11:14:36 +0200 (CEST) Date: Sun, 24 May 2009 11:14:36 +0200 From: Ed Schouten To: Adrian Chadd Message-ID: <20090524091436.GR1271@hoeg.nl> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pqmPt9oPL4cuP/b5" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-xen@freebsd.org, FreeBSD Current Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 09:14:38 -0000 --pqmPt9oPL4cuP/b5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Adrian Chadd wrote: > * Modify the xenconsole driver to attach to ttyv0 (via a kernel > environment variable) so /etc/ttys doesn't need modifying (but this > may confuse tools that assumes /dev/ttyvX =3D=3D syscons.) Please don't. Someone on IRC told me Xen also has some framebuffer feature. Say, someone would port syscons to Xen, the naming would conflict with the console device node. /dev/xc0 is good enough. I even think it should have been called ttyx0, not xc0. --=20 Ed Schouten WWW: http://80386.nl/ --pqmPt9oPL4cuP/b5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkoZD/wACgkQ52SDGA2eCwUzdgCeK7Ho+JrY+ofSH74TuemsqTDO 1aUAn0nrErCEXSB/74ysfr0OHXYTbv8i =mTje -----END PGP SIGNATURE----- --pqmPt9oPL4cuP/b5-- From owner-freebsd-xen@FreeBSD.ORG Sun May 24 09:37:26 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B312106566C; Sun, 24 May 2009 09:37:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f105.google.com (mail-qy0-f105.google.com [209.85.221.105]) by mx1.freebsd.org (Postfix) with ESMTP id 1D6C38FC08; Sun, 24 May 2009 09:37:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qyk3 with SMTP id 3so3958414qyk.3 for ; Sun, 24 May 2009 02:37:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=kklil3SicdM/PqiCTERrQXDmRELqG4hNmNjhW9yOaSE=; b=p5s1xyUzJ2a3ZyRCYKcqNWPlIAXFUu+kiR23rh5ruo8RpSIEK/8876bO2X119Y43A9 Ui8erLDINOx23SgtF8rjHtp8E36z6/ofQ7AdNl+u2xP30+MjTb8CoVP8j2iG03F/XQYW igvIl/NG2Pe2jVPKOl0L9QosJ8LMskM/fkaU8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=jHS7GpmXgB9fCRoIN7+ByuK6ci8seq7ThZwp68BdquTYYkDy9n7B9e9vSfmNDH1TBM e56oW23aMsFZEpwc4xmjd76dAnFD1/VPoiI9a7o3k+TVfGWaXWzjx/BgASfI+v7TvpZF qQHA2tpHwn/nzup8hrQKJwg8rp+R3CSOlvdeY= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.82.12 with SMTP id z12mr1895575qck.59.1243157845589; Sun, 24 May 2009 02:37:25 -0700 (PDT) In-Reply-To: <20090524091436.GR1271@hoeg.nl> References: <20090524091436.GR1271@hoeg.nl> Date: Sun, 24 May 2009 17:37:25 +0800 X-Google-Sender-Auth: a25681193ad9f50a Message-ID: From: Adrian Chadd To: Ed Schouten Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-xen@freebsd.org, FreeBSD Current Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 09:37:26 -0000 2009/5/24 Ed Schouten : > * Adrian Chadd wrote: >> * Modify the xenconsole driver to attach to ttyv0 (via a kernel >> environment variable) so /etc/ttys doesn't need modifying (but this >> may confuse tools that assumes /dev/ttyvX == syscons.) > > Please don't. Someone on IRC told me Xen also has some framebuffer > feature. Say, someone would port syscons to Xen, the naming would > conflict with the console device node. /dev/xc0 is good enough. I even > think it should have been called ttyx0, not xc0. It sounds like I should just stick to modifying etc/ttys then. I'll see about getting consensus on the right way of doing that and then do it in the next couple days. Thanks, Adrian From owner-freebsd-xen@FreeBSD.ORG Sun May 24 09:39:18 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B219F1065679; Sun, 24 May 2009 09:39:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f105.google.com (mail-qy0-f105.google.com [209.85.221.105]) by mx1.freebsd.org (Postfix) with ESMTP id 51BDE8FC24; Sun, 24 May 2009 09:39:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qyk3 with SMTP id 3so3958876qyk.3 for ; Sun, 24 May 2009 02:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=OXaGPbGL9TY17+UevKNrqz5HSgier/oBCWKcOItpVK0=; b=gMMlX+YqFwp1a8SteTo3t+p+i6lB7L3nLS6UVC1558+8XjzR9Rf2oBbUyRC728x+eA ybF7PCepW0tRSWJCZRXPqx+aaWGfGvMvPafbjAbGrq+SkiSEIht+HV9crbme7PJJeq4h 9SFdpPkagVcBCzJaPWiknmmsafQM9zw0pRI2I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=cdotyukNLqd5P9ghHHrCkdfj1/p6dW1ercVQkPG3MRKanwx40g5zorpgy797fMxfwN w2Xp1w0HkYdJqzY+RvfQuqK8QHYOAjyKOl2lW89A3E6OENlv+iRCPcXlR2hQaKZ45vXY Oi6+WtD88FBSfLIwGB30szQK5Gq/g0AN8j6xI= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.109.202 with SMTP id k10mr1909562qcp.58.1243157957848; Sun, 24 May 2009 02:39:17 -0700 (PDT) In-Reply-To: <4A18CA0D.6050805@samsco.org> References: <4A18CA0D.6050805@samsco.org> Date: Sun, 24 May 2009 17:39:17 +0800 X-Google-Sender-Auth: a32ad7212b636522 Message-ID: From: Adrian Chadd To: Scott Long Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-xen@freebsd.org, freebsd-current Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 09:39:19 -0000 2009/5/24 Scott Long : > Treat xen as a new platform and have a src/etc/etc.xen directory that holds > the xen-specific ttys files, along with similar things that it'll > likely need. In -theory- there could be Xen PVM support for i386, amd64 and ia64; with apparently some random work being done on ARM support in the future. I'll chat on IRC with you/others about the most likely sensible way of doing this and then post a summary to the list(s). Thanks, Adrian From owner-freebsd-xen@FreeBSD.ORG Sun May 24 09:44:53 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E569E106564A; Sun, 24 May 2009 09:44:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f105.google.com (mail-qy0-f105.google.com [209.85.221.105]) by mx1.freebsd.org (Postfix) with ESMTP id 877338FC14; Sun, 24 May 2009 09:44:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qyk3 with SMTP id 3so3960130qyk.3 for ; Sun, 24 May 2009 02:44:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=2khcI1F7vy3GJsapFD6Rkr1BQ4fwEhKfBO3czgENtOA=; b=XmpP65k6/nn16oXsqw/74d8nSE1g0GJPDACjUukvh8sph6WSqP1VcCCPcW9ZiVUjw7 qcoBAVRJMzmQXumdqVjt0ersJeXD4/uTBCQXATuuI8sWxKXMBF8zPY5msXbYjdj/HbQ1 FC90ef/qHGCFHJtMVjUqK2o4SuHnvTs7gZkxQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=oKUXzpIDQ8ChwUTvrO72ePCy/XWWjlfj5PhDZl9VhT/Ew48kVMCGD3Ohza6dTi5Kxb /8Q49u/jA6j99Om2k8NlUPvLWAx9JOKHW2r4uDYycUtV+nVNsWtacgceCDITg8R4+kLb 2+wuJA9WjxGTiWSQPzmWkZjCDcHO5YFYJmSrg= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.100.13 with SMTP id w13mr1929575qcn.62.1243158289991; Sun, 24 May 2009 02:44:49 -0700 (PDT) In-Reply-To: References: <4A18CA0D.6050805@samsco.org> Date: Sun, 24 May 2009 17:44:49 +0800 X-Google-Sender-Auth: 86db3c79096997c1 Message-ID: From: Adrian Chadd To: Scott Long Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-xen@freebsd.org, freebsd-current Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 09:44:54 -0000 Ed has also suggested renaming the console device to "ttyx0" to keep in line with the "typical TTY name in BSDs." Adrian From owner-freebsd-xen@FreeBSD.ORG Sun May 24 09:45:49 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 050AF1065678; Sun, 24 May 2009 09:45:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D46818FC26; Sun, 24 May 2009 09:45:48 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5FDAE46B38; Sun, 24 May 2009 05:45:48 -0400 (EDT) Date: Sun, 24 May 2009 10:45:48 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ed Schouten In-Reply-To: <20090524091436.GR1271@hoeg.nl> Message-ID: References: <20090524091436.GR1271@hoeg.nl> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-xen@freebsd.org, FreeBSD Current Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 09:45:49 -0000 On Sun, 24 May 2009, Ed Schouten wrote: > * Adrian Chadd wrote: >> * Modify the xenconsole driver to attach to ttyv0 (via a kernel environment >> variable) so /etc/ttys doesn't need modifying (but this may confuse tools >> that assumes /dev/ttyvX == syscons.) > > Please don't. Someone on IRC told me Xen also has some framebuffer feature. > Say, someone would port syscons to Xen, the naming would conflict with the > console device node. /dev/xc0 is good enough. I even think it should have > been called ttyx0, not xc0. Given that there will be increasing levels of support for "pass-through" hardware access in virtual machine environments and a trend in the direction of virtualization-friendly hardware, we shouldn't preclude the possibility of something a lot closer to syscons working inside of Xen in the future. This means we should leave the syscons device names open so that syscons can claim them if desired. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-xen@FreeBSD.ORG Sun May 24 11:19:13 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 335D91065670; Sun, 24 May 2009 11:19:13 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id C16CE8FC13; Sun, 24 May 2009 11:19:12 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 9B6B61CCED; Sun, 24 May 2009 13:19:10 +0200 (CEST) Date: Sun, 24 May 2009 13:19:10 +0200 From: Ed Schouten To: Robert Watson Message-ID: <20090524111910.GS1271@hoeg.nl> References: <20090524091436.GR1271@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R+WA+n3pAWWgNWUs" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Cc: freebsd-xen@freebsd.org, FreeBSD Current Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 11:19:13 -0000 --R+WA+n3pAWWgNWUs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Robert Watson wrote: > Given that there will be increasing levels of support for "pass-through" = =20 > hardware access in virtual machine environments and a trend in the=20 > direction of virtualization-friendly hardware, we shouldn't preclude the= =20 > possibility of something a lot closer to syscons working inside of Xen in= =20 > the future. This means we should leave the syscons device names open so= =20 > that syscons can claim them if desired. Yes, exactly! --=20 Ed Schouten WWW: http://80386.nl/ --R+WA+n3pAWWgNWUs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkoZLS4ACgkQ52SDGA2eCwW4+ACfcHA61AElSzNFrC1YKLOr9GDV gOkAn0WMZcWbaItCSpWUgZPF4Hw7THiX =8BPG -----END PGP SIGNATURE----- --R+WA+n3pAWWgNWUs-- From owner-freebsd-xen@FreeBSD.ORG Sun May 24 11:25:03 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 583B01065679; Sun, 24 May 2009 11:25:03 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 0BCB88FC14; Sun, 24 May 2009 11:25:02 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n4OBOxbi097377; Sun, 24 May 2009 05:25:00 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4A192E8B.2030204@samsco.org> Date: Sun, 24 May 2009 05:24:59 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Adrian Chadd References: <4A18CA0D.6050805@samsco.org> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-xen@freebsd.org, freebsd-current Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 11:25:03 -0000 Adrian Chadd wrote: > 2009/5/24 Scott Long : > >> Treat xen as a new platform and have a src/etc/etc.xen directory that holds >> the xen-specific ttys files, along with similar things that it'll >> likely need. > > In -theory- there could be Xen PVM support for i386, amd64 and ia64; > with apparently some random work being done on ARM support in the > future. Once you start shifting away from full HVM mode, the instruction set architecture starts becoming much less relevant. Anything using the xc driver is going to behave pretty much the same in respect to the ttys file, regardless of if it's i386 or amd64 or arm. Scott From owner-freebsd-xen@FreeBSD.ORG Sun May 24 11:27:04 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E556B10656C7; Sun, 24 May 2009 11:27:04 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 983378FC08; Sun, 24 May 2009 11:27:04 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n4OBR1KK097390; Sun, 24 May 2009 05:27:01 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4A192F05.7040104@samsco.org> Date: Sun, 24 May 2009 05:27:01 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Adrian Chadd References: <4A18CA0D.6050805@samsco.org> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-xen@freebsd.org, freebsd-current Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 11:27:05 -0000 Adrian Chadd wrote: > Ed has also suggested renaming the console device to "ttyx0" to keep > in line with the "typical TTY name in BSDs." > I don't think that the loss of continuity in naming here is a very good idea. It's been over 15 years, that qualifies as "typical TTY name for FreeBSD". Scott From owner-freebsd-xen@FreeBSD.ORG Sun May 24 11:31:55 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BC31106566C; Sun, 24 May 2009 11:31:55 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 3C1C08FC16; Sun, 24 May 2009 11:31:55 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n4OBVM9n097416; Sun, 24 May 2009 05:31:22 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4A19300A.1020906@samsco.org> Date: Sun, 24 May 2009 05:31:22 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: Robert Watson References: <20090524091436.GR1271@hoeg.nl> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: Ed Schouten , FreeBSD Current , freebsd-xen@freebsd.org Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 11:31:56 -0000 Robert Watson wrote: > On Sun, 24 May 2009, Ed Schouten wrote: > >> * Adrian Chadd wrote: >>> * Modify the xenconsole driver to attach to ttyv0 (via a kernel >>> environment variable) so /etc/ttys doesn't need modifying (but this >>> may confuse tools that assumes /dev/ttyvX == syscons.) >> >> Please don't. Someone on IRC told me Xen also has some framebuffer >> feature. Say, someone would port syscons to Xen, the naming would >> conflict with the console device node. /dev/xc0 is good enough. I even >> think it should have been called ttyx0, not xc0. > > Given that there will be increasing levels of support for "pass-through" > hardware access in virtual machine environments and a trend in the > direction of virtualization-friendly hardware, we shouldn't preclude the > possibility of something a lot closer to syscons working inside of Xen > in the future. This means we should leave the syscons device names open > so that syscons can claim them if desired. > HVM mode already supports "pass-through" with syscons working in it. That is orthogonal to the discussion of supporting the native virtualization features of Xen. Scott From owner-freebsd-xen@FreeBSD.ORG Sun May 24 11:46:27 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CD891065673; Sun, 24 May 2009 11:46:27 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 062A98FC1D; Sun, 24 May 2009 11:46:27 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 953AC46B29; Sun, 24 May 2009 07:46:26 -0400 (EDT) Date: Sun, 24 May 2009 12:46:26 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Scott Long In-Reply-To: <4A19300A.1020906@samsco.org> Message-ID: References: <20090524091436.GR1271@hoeg.nl> <4A19300A.1020906@samsco.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Ed Schouten , FreeBSD Current , freebsd-xen@freebsd.org Subject: Re: Default Xen PVM console? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 11:46:27 -0000 On Sun, 24 May 2009, Scott Long wrote: >>> Please don't. Someone on IRC told me Xen also has some framebuffer >>> feature. Say, someone would port syscons to Xen, the naming would conflict >>> with the console device node. /dev/xc0 is good enough. I even think it >>> should have been called ttyx0, not xc0. >> >> Given that there will be increasing levels of support for "pass-through" >> hardware access in virtual machine environments and a trend in the >> direction of virtualization-friendly hardware, we shouldn't preclude the >> possibility of something a lot closer to syscons working inside of Xen in >> the future. This means we should leave the syscons device names open so >> that syscons can claim them if desired. > > HVM mode already supports "pass-through" with syscons working in it. That is > orthogonal to the discussion of supporting the native virtualization > features of Xen. Not sure I follow this comment: what I'm saying is that the Xen-specific console device should not use the same device names as syscons, so that the two can coexist in a single installation. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-xen@FreeBSD.ORG Sun May 24 14:14:37 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4663110656D6 for ; Sun, 24 May 2009 14:14:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f105.google.com (mail-qy0-f105.google.com [209.85.221.105]) by mx1.freebsd.org (Postfix) with ESMTP id 02CB48FC23 for ; Sun, 24 May 2009 14:14:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qyk3 with SMTP id 3so4035762qyk.3 for ; Sun, 24 May 2009 07:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=t/6Mz4LWUwTxMLvdaz7JSBtXuXqvnrtN6aNqFIv70jQ=; b=X2XhthbY5p2bEDAme+fr2LyMsSFTxrrtGIY/xYO0ahhsSqP0el2PsmNeM6gSVP4c4u TcHxP2PwL+iCIjIqDbyf4pp8rCUVIUVhRqjWEDvLx3TwWTx4N5mCgSmERiw8BMwSLan9 2wtx14bH8p9s+g2lMDJ0FF7Qz7vNqactqPXnA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=TJOEzsj8VwUQ3RYu36+benQcfybUlb5x2MyAyCQUEvtIO64iEYcRSeHjrR+peW7S9E 9IPTGJSM+6YkkpRAx+LK1OJYfqTdSA0YX/ZjmPBaDH49qtAwCjnDuGV7PIvUwTn98Eyf GXSvO4Uphb6SKo0qS5Zqd7/r+brtHEqsdjpE4= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.100.13 with SMTP id w13mr1961522qcn.62.1243174476508; Sun, 24 May 2009 07:14:36 -0700 (PDT) Date: Sun, 24 May 2009 22:14:36 +0800 X-Google-Sender-Auth: 229977c317c52a4a Message-ID: From: Adrian Chadd To: freebsd-xen@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: freebsd-xen images X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 14:14:37 -0000 I've just written up a wiki page which links to the images that I'm toying with. http://wiki.freebsd.org/AdrianChadd/XenImages My build script is there; there's also notes on what I've done to make a base build/install work as a DomU and how to call makefs to build an initial image. It should be enough for people to bootstrap a FreeBSD/Xen DomU to evaluate. I'm currently trying out the freebsd-6.3-release image that I've built and it is currently uploading for others to test out. It seems slightly more stable than the freebsd releng_6 image. FreeBSD-current is stable except for a repeatable VM page bug which I'm looking at (but Kip will almost certainly beat me to it) and I as of yet haven't successfully built a releng_7 xen image. I hope this has taken all of the mystery out of bootstrapping a FreeBSD/Xen DomU. :) Thanks, Adrian From owner-freebsd-xen@FreeBSD.ORG Sun May 24 15:50:18 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63C3A106564A for ; Sun, 24 May 2009 15:50:18 +0000 (UTC) (envelope-from fb-xen@psconsult.nl) Received: from mx1.psconsult.nl (psc11.adsl.iaf.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id EACF18FC27 for ; Sun, 24 May 2009 15:50:17 +0000 (UTC) (envelope-from fb-xen@psconsult.nl) Received: from mx1.psconsult.nl (localhost [80.89.238.138]) by mx1.psconsult.nl (8.14.2/8.14.2) with ESMTP id n4OFAQni068277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 24 May 2009 17:10:31 +0200 (CEST) (envelope-from fb-xen@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.2/8.14.2/Submit) id n4OFAQU4068276 for freebsd-xen@freebsd.org; Sun, 24 May 2009 17:10:26 +0200 (CEST) (envelope-from fb-xen@psconsult.nl) Date: Sun, 24 May 2009 17:10:26 +0200 From: Paul Schenkeveld To: freebsd-xen@freebsd.org Message-ID: <20090524151025.GA67024@psconsult.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: freebsd-xen images X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 15:50:18 -0000 On Sun, May 24, 2009 at 10:14:36PM +0800, Adrian Chadd wrote: > I've just written up a wiki page which links to the images that I'm toying with. > > http://wiki.freebsd.org/AdrianChadd/XenImages Thanks a lot! Nice to see all that recent activity on FreeBSD dom0! Over the last 12 months or so I've tried several times to get a working dom0 to try the FreeBSD Xen bits on but being a complete Lunix nono, three attempts with Linux failed (with Centos 5.0 - xen too old, OpenSuse 11.0 - system wouldn't boot after vanilla install, and Centos 5.2 - I stalled trying to get all the software installed to run Xen). At EuroBSDcon 2008 I had a talk with Michael Dexter about using a netbsd Dom0 (see http://multiplicity.bsd.lv/) but only 'almost' got it to work but choked on getting a grub working on 64-bit netbsd and other challenges. Yesterday I decided to try again from the beginning, now with Solaris Express Community Edition build 114 after a chat with a good friend working at Sun. I finally got a working setup, under VMware Fusion first but now starting installation on a freed up quad core workstation. This all shows that getting a dom0 up and running can be a challenge if you're not Linux literate. Are there any more detailed resources on the net about "getting your first dom0 that's capable of running FreeBSD domU up and running for newbies"? The weekend is almost over so $WORK will take over my agenda soon. If no good resources are available I'm willing to spend more time on this and write up notes to be put on the wiki. Regards, Paul Schenkeveld From owner-freebsd-xen@FreeBSD.ORG Sun May 24 15:56:06 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3658D106567A for ; Sun, 24 May 2009 15:56:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f105.google.com (mail-qy0-f105.google.com [209.85.221.105]) by mx1.freebsd.org (Postfix) with ESMTP id E08658FC20 for ; Sun, 24 May 2009 15:55:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qyk3 with SMTP id 3so4072291qyk.3 for ; Sun, 24 May 2009 08:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=GnaVHtsUZQBwHBWq0k+cL/Uo701fTySnfx29k9mawtw=; b=fShobjcWTCWpFzlyDp2XVeLNBk9T+005/qESbdr42kG+f1bDz4yGaBiJC/cC3qCyRU wGOQhISu6Y76za42Zt0pIDizRhHhFvma/yt3cAuRaGxN/E76DQNXOZY5rTvbGrlFiPYL Nn+a8+/b9cQ7rxllyVeMCTAXlrazG446UZvhQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=nhaD22TN8TH22wNSxInyGCXOxdufytWnmVXdVRCsOuNtZyLMYJUoLbZzYtlFG9I5sf hX5mFB5pw7ybSZDm8Iu3DWjZpCVeiQy6hgKNMnql2pb9i1RVimvpUdrf17S22IrDuSow yuK/PceYvUw/XBD+iniScEwgPb3BcUDX/TV0M= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.100.134 with SMTP id y6mr1876848qcn.27.1243180557828; Sun, 24 May 2009 08:55:57 -0700 (PDT) In-Reply-To: <20090524151025.GA67024@psconsult.nl> References: <20090524151025.GA67024@psconsult.nl> Date: Sun, 24 May 2009 23:55:57 +0800 X-Google-Sender-Auth: c6ea04262fb9ca68 Message-ID: From: Adrian Chadd To: Paul Schenkeveld Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-xen@freebsd.org Subject: Re: freebsd-xen images X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 15:56:06 -0000 2009/5/24 Paul Schenkeveld : > Thanks a lot! =A0Nice to see all that recent activity on FreeBSD dom0! FreeBSD DomU you mean? :) There's no FreeBSD dom0 support. > This all shows that getting a dom0 up and running can be a challenge if > you're not Linux literate. =A0Are there any more detailed resources on th= e > net about "getting your first dom0 that's capable of running FreeBSD domU > up and running for newbies"? Yup! The way is simple: * grab centos 5.3, i386 edition (i've not tried the 64 bit stuff) * you uncheck all the package groups except "base", including "dial up networking" and "text" internet * (this means you only need CD 1, not all 6.) * Install the base system * reboot, make sure everything is fine, run "yum update", fiddle with things as needed * Then "yum install xen" * make sure /boot/grub/menu.lst is set to boot xen automatically. That is basically it ;) There's other stuff to do (such as figuring out how to drive their networking scripts) but the default "bridged" eth0 is perfectly fine for basic testing. I had trouble with my recentish intel desktop motherboard(s) - I had to boot the installer and normal kernel with 'acpi=3Doff' but -not- boot Xen with that. Adrian From owner-freebsd-xen@FreeBSD.ORG Sun May 24 18:50:19 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 894C0106568F; Sun, 24 May 2009 18:50:19 +0000 (UTC) (envelope-from paul@psconsult.nl) Received: from mx1.psconsult.nl (psc11.adsl.iaf.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id 17AE48FC23; Sun, 24 May 2009 18:50:18 +0000 (UTC) (envelope-from paul@psconsult.nl) Received: from mx1.psconsult.nl (localhost [80.89.238.138]) by mx1.psconsult.nl (8.14.2/8.14.2) with ESMTP id n4OIIQAd076908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 May 2009 20:18:31 +0200 (CEST) (envelope-from paul@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.2/8.14.2/Submit) id n4OIIQ1K076907; Sun, 24 May 2009 20:18:26 +0200 (CEST) (envelope-from paul@psconsult.nl) Date: Sun, 24 May 2009 20:18:26 +0200 From: Paul Schenkeveld To: Adrian Chadd Message-ID: <20090524181826.GA76477@psconsult.nl> References: <20090524151025.GA67024@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-xen@freebsd.org Subject: Re: freebsd-xen images X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 18:50:20 -0000 On Sun, May 24, 2009 at 11:55:57PM +0800, Adrian Chadd wrote: > 2009/5/24 Paul Schenkeveld : > > > Thanks a lot!  Nice to see all that recent activity on FreeBSD dom0! > > FreeBSD DomU you mean? :) There's no FreeBSD dom0 support. Yes of course. (or was it widhful thinking?) > > This all shows that getting a dom0 up and running can be a challenge if > > you're not Linux literate.  Are there any more detailed resources on the > > net about "getting your first dom0 that's capable of running FreeBSD domU > > up and running for newbies"? > > Yup! > > > The way is simple: > * grab centos 5.3, i386 edition (i've not tried the 64 bit stuff) > * you uncheck all the package groups except "base", including "dial up > networking" and "text" internet > * (this means you only need CD 1, not all 6.) > * Install the base system > * reboot, make sure everything is fine, run "yum update", fiddle with > things as needed > > * Then "yum install xen" > * make sure /boot/grub/menu.lst is set to boot xen automatically. > > That is basically it ;) There's other stuff to do (such as figuring > out how to drive their networking scripts) but the default "bridged" > eth0 is perfectly fine for basic testing. > I had trouble with my recentish intel desktop motherboard(s) - I had > to boot the installer and normal kernel with 'acpi=off' but -not- boot > Xen with that. Which board model(s)? I've just installed Solaris on a DP35DP with Q6600 core-2 duo and 8GB RAM. Works nice (except for USB-legacy making the keyboard useless during boot). > Adrian Thanks again for the great work on Xen! -- Paul Schenkeveld From owner-freebsd-xen@FreeBSD.ORG Mon May 25 01:38:40 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED242106564A for ; Mon, 25 May 2009 01:38:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f105.google.com (mail-qy0-f105.google.com [209.85.221.105]) by mx1.freebsd.org (Postfix) with ESMTP id A02738FC20 for ; Mon, 25 May 2009 01:38:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qyk3 with SMTP id 3so4284409qyk.3 for ; Sun, 24 May 2009 18:38:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=IvICiUzTRYxoqvHxkTkAPi/2Kt9wymGVQCk6R6kOWpI=; b=sYApUOJuD5rNHWocTVhehPtUIAoHMIHhWp7Q/E4Zk80osh7Y9JF1PJlW1PsAat9KlB hUwZR6n+WTES4oRk6hutUpStq4ZpOVzroNVlEE9JxMaXmbLmObcPMaAZaLdrSlgOqH8j UaXa1OlWEA+BHZ22yupylGWSLUhVeJd0tpYbA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=jyco4DVzKTd6HSeHBoY7wzu1zGaNgM2ioqS6C7xflHfaBDqcL6EOKy4nKcULOVADFN R7cVHr8Hi/C0phHAmwDbt4ZQ72KOZKdU6I9ESAUho4oage3LpWBfjj9DhL0Ft6SUpFI5 kEebB7//33cywIFi8H9yr0fmnmaAOLaqUnbHw= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.100.13 with SMTP id w13mr2046077qcn.62.1243215520024; Sun, 24 May 2009 18:38:40 -0700 (PDT) In-Reply-To: <20090524181826.GA76477@psconsult.nl> References: <20090524151025.GA67024@psconsult.nl> <20090524181826.GA76477@psconsult.nl> Date: Mon, 25 May 2009 09:38:40 +0800 X-Google-Sender-Auth: 00fb69f5d2a8bfe2 Message-ID: From: Adrian Chadd To: Paul Schenkeveld Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-xen@freebsd.org Subject: Re: freebsd-xen images X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2009 01:38:41 -0000 2009/5/25 Paul Schenkeveld : > I was going to document my Xen server setup later on, including some information from my testing. To summarise - RHEL/Centos seem quite happy(!) on the xen 2.6.18 kernel whilst backporting drivers; others have forward ported Xen. I've had all kinds of weird crap happen with Debian/Ubuntu. Fedora Core has been trying to forward port stuff too and integrate it all into the paravirt ops framework so I think their dom0 support has been busted until very recently. I'll dump this into the Wiki when I get time. >> I had trouble with my recentish intel desktop motherboard(s) - I had >> to boot the installer and normal kernel with 'acpi=3Doff' but -not- boot >> Xen with that. > > Which board model(s)? =A0I've just installed Solaris on a DP35DP with Q66= 00 > core-2 duo and 8GB RAM. =A0Works nice (except for USB-legacy making the > keyboard useless during boot). I don't recall off-hand; I'll look at my documentation later and put it in the Wiki. adrian From owner-freebsd-xen@FreeBSD.ORG Mon May 25 05:48:16 2009 Return-Path: Delivered-To: freebsd-xen@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B99E1106564A; Mon, 25 May 2009 05:48:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2838FC18; Mon, 25 May 2009 05:48:16 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from freefall.freebsd.org (adrian@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4P5mGWp017466; Mon, 25 May 2009 05:48:16 GMT (envelope-from adrian@freefall.freebsd.org) Received: (from adrian@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4P5mGpD017462; Mon, 25 May 2009 05:48:16 GMT (envelope-from adrian) Date: Mon, 25 May 2009 05:48:16 GMT Message-Id: <200905250548.n4P5mGpD017462@freefall.freebsd.org> To: adrian@FreeBSD.org, freebsd-i386@FreeBSD.org, freebsd-xen@FreeBSD.org From: adrian@FreeBSD.org Cc: Subject: Re: i386/134926: FreeBSD-current Xen DomU networking panic - out of tx mbufs? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2009 05:48:17 -0000 Synopsis: FreeBSD-current Xen DomU networking panic - out of tx mbufs? Responsible-Changed-From-To: freebsd-i386->freebsd-xen Responsible-Changed-By: adrian Responsible-Changed-When: Mon May 25 05:47:55 UTC 2009 Responsible-Changed-Why: Over to maintainer http://www.freebsd.org/cgi/query-pr.cgi?pr=134926 From owner-freebsd-xen@FreeBSD.ORG Mon May 25 06:35:25 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6426D1065687 for ; Mon, 25 May 2009 06:35:25 +0000 (UTC) (envelope-from fb-xen@psconsult.nl) Received: from mx1.psconsult.nl (psc11.adsl.iaf.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id E81678FC23 for ; Mon, 25 May 2009 06:35:24 +0000 (UTC) (envelope-from fb-xen@psconsult.nl) Received: from mx1.psconsult.nl (localhost [80.89.238.138]) by mx1.psconsult.nl (8.14.2/8.14.2) with ESMTP id n4P6ZIag005231 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 25 May 2009 08:35:23 +0200 (CEST) (envelope-from fb-xen@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.2/8.14.2/Submit) id n4P6ZI2A005230 for freebsd-xen@freebsd.org; Mon, 25 May 2009 08:35:18 +0200 (CEST) (envelope-from fb-xen@psconsult.nl) Date: Mon, 25 May 2009 08:35:18 +0200 From: Paul Schenkeveld To: freebsd-xen@freebsd.org Message-ID: <20090525063518.GA82256@psconsult.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: freebsd-xen images X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2009 06:35:25 -0000 On Sun, May 24, 2009 at 10:14:36PM +0800, Adrian Chadd wrote: > I'm currently trying out the freebsd-6.3-release image that I've built > and it is currently uploading for others to test out. It seems > slightly more stable than the freebsd releng_6 image. FreeBSD-current > is stable except for a repeatable VM page bug which I'm looking at > (but Kip will almost certainly beat me to it) and I as of yet haven't > successfully built a releng_7 xen image. One small issue with the 6.3 image, after executing halt or halt -p in the domU, it always immediately reboots. To really stop it one has to 'xm destroy' from dom0. (dom0 is Solaris Express Community Edition if that matters, I'm still trying to find out what version of Xen is included). -- Paul Schenkeveld From owner-freebsd-xen@FreeBSD.ORG Mon May 25 06:43:56 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3479A1065670 for ; Mon, 25 May 2009 06:43:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id DDEB48FC13 for ; Mon, 25 May 2009 06:43:55 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 3so1621988qwe.7 for ; Sun, 24 May 2009 23:43:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=bgtj91/Fe8kqUo+cPDShOu3daRZZ10ovqgQr0yAQzQQ=; b=EMva9WVKPXJPzXNzzlYE0oYgojpn2aePLYh62f3xfzDkUJIZaDkRZddfl8fnIzHK5Q hyzRKy+cA9ysvcilhuRE4VDweki0yZJ0ak+gAQUrPYouSx0XoY2ME0OEpdZp6Nyb3sPM LwAyYzv27RMJ+EmPeP54k7VJS/+OqANrMKx5o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=eCHN7go3wGtaLO34M0CHrQQghGAotZv4qIKxbjLTs9zzVc4YseXUGhPXPmkgyKXDzt eoSsiTTqBvduF8CdmbSbhJOz8U6V++rsLlBaJ09tMYIZUFbn4TVW5Py68yt/HRP+tWhz y8yJsI/r1enY3ccRjyY9mLaEc5J8o9n7Tdx5I= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.96.142 with SMTP id h14mr2046910qcn.99.1243233835225; Sun, 24 May 2009 23:43:55 -0700 (PDT) In-Reply-To: <20090525063518.GA82256@psconsult.nl> References: <20090525063518.GA82256@psconsult.nl> Date: Mon, 25 May 2009 14:43:54 +0800 X-Google-Sender-Auth: 8e0ea7aa57e58338 Message-ID: From: Adrian Chadd To: Paul Schenkeveld Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-xen@freebsd.org Subject: Re: freebsd-xen images X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2009 06:43:56 -0000 2009/5/25 Paul Schenkeveld : > One small issue with the 6.3 image, after executing halt or halt -p in > the domU, it always immediately reboots. To really stop it one has to > 'xm destroy' from dom0. I've noticed some "weird stuff" like that. Would you please run 'send-pr' in the VM and submit a PR with a description/etc? That way it is documented. > (dom0 is Solaris Express Community Edition if that matters, I'm still > trying to find out what version of Xen is included). "xm dmesg" and "xm info" are helpful commands here. Adrian From owner-freebsd-xen@FreeBSD.ORG Mon May 25 11:07:05 2009 Return-Path: Delivered-To: freebsd-xen@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 360E71065680 for ; Mon, 25 May 2009 11:07:04 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8E61D8FC0C for ; Mon, 25 May 2009 11:07:04 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4PB74ox093029 for ; Mon, 25 May 2009 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4PB7441093025 for freebsd-xen@FreeBSD.org; Mon, 25 May 2009 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 25 May 2009 11:07:04 GMT Message-Id: <200905251107.n4PB7441093025@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-xen@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-xen@FreeBSD.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2009 11:07:06 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o i386/134926 xen FreeBSD-current Xen DomU networking panic - out of tx 1 problem total. From owner-freebsd-xen@FreeBSD.ORG Wed May 27 02:50:03 2009 Return-Path: Delivered-To: freebsd-xen@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 304FB106566B for ; Wed, 27 May 2009 02:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1323E8FC1B for ; Wed, 27 May 2009 02:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4R2o2VX094176 for ; Wed, 27 May 2009 02:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4R2o2Yn094175; Wed, 27 May 2009 02:50:02 GMT (envelope-from gnats) Date: Wed, 27 May 2009 02:50:02 GMT Message-Id: <200905270250.n4R2o2Yn094175@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: i386/134926: commit references a PR X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 02:50:03 -0000 The following reply was made to PR i386/134926; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: i386/134926: commit references a PR Date: Wed, 27 May 2009 02:49:22 +0000 (UTC) Author: adrian Date: Wed May 27 02:49:08 2009 New Revision: 192871 URL: http://svn.freebsd.org/changeset/base/192871 Log: Ensure that there are enough TX mbuf ring slots available before beginning to dequeue a packet. The tx path was trying to ensure that enough Xenbus TX ring slots existed but it didn't check to see whether the mbuf TX ring slots were also available. They get freed in xn_txeof() which occurs after transmission, rather than earlier on in the process. (The same happens under Linux too.) Due to whatever reason (CPU use, scheduling, memory constraints, whatever) the mbuf TX ring may not have enough slots free and would allocate slot 0. This is used as the freelist head pointer to represent "free" mbuf TX ring slots; setting this to an actual mbuf value rather than an id crashes the code. This commit introduces some basic code to track the TX mbuf ring use and then (hopefully!) ensures that enough slots are free in said TX mbuf ring before it enters the actual work loop. A few notes: * Similar logic needs to be introduced to check there are enough actual slots available in the xenbuf TX ring. There's some logic which is invoked earlier but it doesn't hard-check against the number of available ring slots. Its trivial to do; I'll do it in a subsequent commit. * As I've now commented in the source, it is likely possible to deadlock the driver under certain conditions where the rings aren't receiving any changes (which I should enumerate) and thus Xen doesn't send any further software interrupts. I need to make sure that the timer(s) are running right and the queues are periodically kicked. PR: 134926 Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Wed May 27 01:56:37 2009 (r192870) +++ head/sys/dev/xen/netfront/netfront.c Wed May 27 02:49:08 2009 (r192871) @@ -176,6 +176,7 @@ static int xennet_get_responses(struct n */ struct xn_chain_data { struct mbuf *xn_tx_chain[NET_TX_RING_SIZE+1]; + int xn_tx_chain_cnt; struct mbuf *xn_rx_chain[NET_RX_RING_SIZE+1]; }; @@ -727,6 +728,10 @@ netif_release_tx_bufs(struct netfront_in np->grant_tx_ref[i]); np->grant_tx_ref[i] = GRANT_INVALID_REF; add_id_to_freelist(np->tx_mbufs, i); + np->xn_cdata.xn_tx_chain_cnt--; + if (np->xn_cdata.xn_tx_chain_cnt < 0) { + panic("netif_release_tx_bufs: tx_chain_cnt must be >= 0"); + } m_freem(m); } } @@ -1089,6 +1094,10 @@ xn_txeof(struct netfront_info *np) np->xn_cdata.xn_tx_chain[id] = NULL; add_id_to_freelist(np->xn_cdata.xn_tx_chain, id); + np->xn_cdata.xn_tx_chain_cnt--; + if (np->xn_cdata.xn_tx_chain_cnt < 0) { + panic("netif_release_tx_bufs: tx_chain_cnt must be >= 0"); + } m_free(m); } np->tx.rsp_cons = prod; @@ -1417,7 +1426,6 @@ xn_start_locked(struct ifnet *ifp) ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } - /* * Defragment the mbuf if necessary. @@ -1433,6 +1441,36 @@ xn_start_locked(struct ifnet *ifp) m_head = m; } + /* Determine how many fragments now exist */ + for (m = m_head, nfrags = 0; m; m = m->m_next) + nfrags++; + + /* + * Don't attempt to queue this packet if there aren't enough free entries in the chain. + * There isn't a 1:1 correspondance between the mbuf TX ring and the xenbus TX ring. + * xn_txeof() may need to be called to free up some slots. + * + * It is quite possible that this can be later eliminated if it turns out that partial + * packets can be pushed into the ringbuffer, with fragments pushed in when further slots + * free up. + * + * It is also quite possible that the driver will lock up - Xen may not send another + * interrupt to kick the tx/rx processing if the xenbus RX ring is full and xenbus TX ring + * is empty - no further TX work can be done until space is made in the TX mbuf ring and + * the RX side may be waiting for TX data to continue. It is quite possible some timer + * event should be created to kick TX/RX processing along in certain conditions. + */ + + /* its not +1 like the allocation because we need to keep slot [0] free for the freelist head */ + if (sc->xn_cdata.xn_tx_chain_cnt + nfrags >= NET_TX_RING_SIZE) { + printf("xn_start_locked: xn_tx_chain_cnt (%d) + nfrags %d >= NET_TX_RING_SIZE (%d); must be full!\n", + (int) sc->xn_cdata.xn_tx_chain_cnt, (int) nfrags, (int) NET_TX_RING_SIZE); + IF_PREPEND(&ifp->if_snd, m_head); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + break; + } + + /* * Start packing the mbufs in this chain into * the fragment pointers. Stop when we run out @@ -1443,6 +1481,11 @@ xn_start_locked(struct ifnet *ifp) for (m = m_head; m; m = m->m_next) { tx = RING_GET_REQUEST(&sc->tx, i); id = get_id_from_freelist(sc->xn_cdata.xn_tx_chain); + if (id == 0) + panic("xn_start_locked: was allocated the freelist head!\n"); + sc->xn_cdata.xn_tx_chain_cnt++; + if (sc->xn_cdata.xn_tx_chain_cnt >= NET_TX_RING_SIZE+1) + panic("xn_start_locked: tx_chain_cnt must be < NET_TX_RING_SIZE+1\n"); sc->xn_cdata.xn_tx_chain[id] = m; tx->id = id; ref = gnttab_claim_grant_reference(&sc->gref_tx_head); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-xen@FreeBSD.ORG Wed May 27 06:30:09 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACCBA1065672 for ; Wed, 27 May 2009 06:30:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f105.google.com (mail-qy0-f105.google.com [209.85.221.105]) by mx1.freebsd.org (Postfix) with ESMTP id 688A28FC15 for ; Wed, 27 May 2009 06:30:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qyk3 with SMTP id 3so6287539qyk.3 for ; Tue, 26 May 2009 23:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=BVT743L/w71q5nfn4kKf4koIr8BiH1V0cPOCxKESPTQ=; b=kZxetns41orPFiq3kB83AKbqQKtdxgpWZ0IZJl200T67FYhZkX5Aa/zLxxBuUp1dJO Tjfjt39mYhyI+V/4dlVizhJp6rECOnH+KUmojGueJYbSZHKG7KiHBc/5srU00Xfdo6w/ b73kJQLCSkv+TTuiNbfYtepelJScY2cqzs6AE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=b+PIWN1hlhAzMcRRmOTfb5fp7SXvTFrOZ6jIkYcKM9XnRwX++QAyQMInJ/TcSl/Brh O1c/jrN//ogX29cIivoh5+Z1Q35mTANz2kj9cGHNyBatlRxbDHVLIIypqzLne6SgTzRQ tNqpcmresY0vp42fhx11r/x46byaS63+RlI/M= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.79.17 with SMTP id n17mr2648314qck.82.1243405808587; Tue, 26 May 2009 23:30:08 -0700 (PDT) Date: Wed, 27 May 2009 14:30:08 +0800 X-Google-Sender-Auth: 5d4ca4fbfa10db88 Message-ID: From: Adrian Chadd To: freebsd-xen@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: netfront changes (was Re: i386/134926: FreeBSD-current Xen DomU networking panic - out of tx mbufs?) X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 06:30:09 -0000 G'day, I've committed some sanity checking code to the FreeBSD-current/Xen netfront drivers. The driver now ensures there are TX mbuf and xen TX ring descriptor slots available before it queues a packet. There's some debugging printf()'s that will spit out messages when things go awry, eg: xn_start_locked: xn_tx_chain_cnt (254) + nfrags 2 >= NET_TX_RING_SIZE (256); must be full! xn_start_locked: xn_tx_chain_cnt (255) + nfrags 1 >= NET_TX_RING_SIZE (256); must be full! This seems to have ceased the panics under CPU/memory pressure on my playpen server. I'm going to continue tidying up the netfront driver a little more over the next few days to hopefully wrap up some dangling loose ends which I can see. I'd appreciate it if people could give FreeBSD-current/Xen a right royal thrashing (eg, 4 FreeBSD vms on one host pegging network and CPU traffic at maximum between each other) to try and elicit any other crazy network behaviour. There's only so much I can test atm. Thanks, Adrian Adrian From owner-freebsd-xen@FreeBSD.ORG Thu May 28 04:22:18 2009 Return-Path: Delivered-To: freebsd-xen@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D7281065672; Thu, 28 May 2009 04:22:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 435D88FC14; Thu, 28 May 2009 04:22:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from freefall.freebsd.org (adrian@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4S4MIYP023815; Thu, 28 May 2009 04:22:18 GMT (envelope-from adrian@freefall.freebsd.org) Received: (from adrian@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4S4MIks023811; Thu, 28 May 2009 04:22:18 GMT (envelope-from adrian) Date: Thu, 28 May 2009 04:22:18 GMT Message-Id: <200905280422.n4S4MIks023811@freefall.freebsd.org> To: adrian@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-xen@FreeBSD.org From: adrian@FreeBSD.org Cc: Subject: Re: kern/135008: FreeBSD-current/Xen timecounter jumps X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2009 04:22:19 -0000 Synopsis: FreeBSD-current/Xen timecounter jumps Responsible-Changed-From-To: freebsd-bugs->freebsd-xen Responsible-Changed-By: adrian Responsible-Changed-When: Thu May 28 04:21:40 UTC 2009 Responsible-Changed-Why: Over to maintainer. http://www.freebsd.org/cgi/query-pr.cgi?pr=135008 From owner-freebsd-xen@FreeBSD.ORG Thu May 28 04:50:03 2009 Return-Path: Delivered-To: freebsd-xen@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61ABD106566C for ; Thu, 28 May 2009 04:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4FE2B8FC14 for ; Thu, 28 May 2009 04:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4S4o3dt041632 for ; Thu, 28 May 2009 04:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4S4o3EJ041623; Thu, 28 May 2009 04:50:03 GMT (envelope-from gnats) Date: Thu, 28 May 2009 04:50:03 GMT Message-Id: <200905280450.n4S4o3EJ041623@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org From: Adrian Chadd Cc: Subject: Re: kern/135008: FreeBSD-current/Xen timecounter jumps X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Adrian Chadd List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2009 04:50:03 -0000 The following reply was made to PR kern/135008; it has been noted by GNATS. From: Adrian Chadd To: bug-followup@freebsd.org Cc: Subject: Re: kern/135008: FreeBSD-current/Xen timecounter jumps Date: Thu, 28 May 2009 12:25:45 +0800 .. now that the RTC code is in and I've figured out whats going on there, the problem has become obvious. Changing the dom0 clock by > 1 second seems to trigger a re-read of the wall clock in the DomU. The DomU sets the TOD to the wall clock - but this unfortunately sets it to the hypervisor start time rather than including the start time + uptime. The fix is to figure out the code path(s) in the xen clock code and fix the TOD update to be correct. From owner-freebsd-xen@FreeBSD.ORG Thu May 28 06:39:40 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCAD01065687 for ; Thu, 28 May 2009 06:39:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.221.173]) by mx1.freebsd.org (Postfix) with ESMTP id 9643D8FC17 for ; Thu, 28 May 2009 06:39:40 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qyk3 with SMTP id 3so7406496qyk.3 for ; Wed, 27 May 2009 23:39:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=4U1HTn5jvMWlOJNyR8JC0IW94HiEp6YWFbtQ5MTV3uA=; b=eBfS+PK2Rx7vV2qebIBeLEzA464Lg+ryJC/PUrkfKZgX25yDl076QWASxleRZTdXrh 3AoYsHaknMS3yg0kMiEfrFuJH5lYrVKAuNE86xLJjqWg/5nCsi7xskUfcYs9OuS9bpM8 38YGAgtAMzX/VQox4e1exKi+V6tOm14hhIVyE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=ByQ4b3PqY6F287WR/+ps7YcqI1ugfLAUAtBkJrTQXQpS2Z3WdRtMuQkDCRFU64uvDu APd1neuAaZ/9AhOITznU5qpUY1/Y2fnRObC0kwYF+4T3Alf8vA3OP2GtxalxUS4dtr2e MgQag2Lijtlyk/gQ48n4XlqofU9mXs/M7gAVU= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.97.194 with SMTP id m2mr578558qcn.21.1243492779778; Wed, 27 May 2009 23:39:39 -0700 (PDT) Date: Thu, 28 May 2009 14:39:39 +0800 X-Google-Sender-Auth: 2a1c9e13fb4fba0b Message-ID: From: Adrian Chadd To: freebsd-xen@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Update: Xen, networking, RTC and clocks X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2009 06:39:41 -0000 G'day, I've committed a basic Xen Hypervisor RTC to FreeBSD-current. The time is now correctly synced to the hypervisor TOD clock. I've figured out the "weirdness" in the running clock and time of day changes. Updates to the Dom0 clock will touch the hypervisor clock. The current -current logic doesn't read the Xen hypervisor TOD and so a drift of > 1 second seems to set the -current TOD clock to the wrong value (actually, the "hypervisor start" TOD. :) I've also fixed some memory exhaustion issues in the netfront driver. It now doesn't panic for me under stress. Anyway. I'd appreciate it if people updated to the latest -current and tested Xen out. Thanks, Adrian From owner-freebsd-xen@FreeBSD.ORG Thu May 28 12:14:36 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4991A1065674 for ; Thu, 28 May 2009 12:14:36 +0000 (UTC) (envelope-from gofx-freebsd-xen@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 03E648FC08 for ; Thu, 28 May 2009 12:14:35 +0000 (UTC) (envelope-from gofx-freebsd-xen@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1M9eVC-0001Gp-Tp for freebsd-xen@freebsd.org; Thu, 28 May 2009 12:14:30 +0000 Received: from 89-186-142-125.dynamic.primacom.net ([89.186.142.125]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 May 2009 12:14:30 +0000 Received: from js by 89-186-142-125.dynamic.primacom.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 May 2009 12:14:30 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-xen@freebsd.org From: Julian Stecklina Date: Thu, 28 May 2009 14:14:20 +0200 Lines: 21 Message-ID: <873aaps9ur.fsf@tabernacle.lan> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 89-186-142-125.dynamic.primacom.net X-Archive: encrypt User-Agent: Gnus/5.101 (Gnus v5.10.10) Cancel-Lock: sha1:0fNTHdcLZTXkm6hAE32+WO37FVk= Sender: news Subject: Re: Update: Xen, networking, RTC and clocks X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2009 12:14:36 -0000 Adrian Chadd writes: > G'day, > > I've committed a basic Xen Hypervisor RTC to FreeBSD-current. The time > is now correctly synced to the hypervisor TOD clock. Thank you! If I ever see you in person, remind me to buy you a beer or two. :) > Anyway. I'd appreciate it if people updated to the latest -current and > tested Xen out. I'll try to do that in the next couple of days. Regards, -- Julian Stecklina The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners - Ernst Jan Plugge From owner-freebsd-xen@FreeBSD.ORG Fri May 29 13:45:59 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41CFE1065676 for ; Fri, 29 May 2009 13:45:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id F3EF58FC1E for ; Fri, 29 May 2009 13:45:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 3so3234643qwe.7 for ; Fri, 29 May 2009 06:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=OfZ/ciVFRkiepCrinP2QO+FpbY11FwMhLjg8gu6G5kE=; b=FzCIBZGOUjBpRBxphZZU31rgjt540jFjN1L7Iug/2vJo3PCq1BYxVa+ORTNkJAJWk3 KZXdJn7+E7sKqpXm6HNBQJTVMbOcFsEwzmp28DH14zhSB3Yzrla3jQFfQixYHWWMqsuF I3pBb96xTkn1Qt85ZyJShq03lDwevu4LQQFd0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=qFJVjWMQ/GY0QpSodS2RBKXmdl+JkYqYl256h3Z17XiwUBmWLRkjWUwS8SZm5+GXAG LxPvS7ORvDnCohsuNpCLogXIoR8kM/HgEskn5RH0aXTw6POF67gPfPwm7dHGNxYgOOZN 1NidAKJK22aIIbKaL2c80FrBaUzsQoaH7ca58= MIME-Version: 1.0 Sender: adrian.chadd@gmail.com Received: by 10.229.97.194 with SMTP id m2mr1084561qcn.21.1243604758486; Fri, 29 May 2009 06:45:58 -0700 (PDT) Date: Fri, 29 May 2009 21:45:58 +0800 X-Google-Sender-Auth: 18c1b28bff683a51 Message-ID: From: Adrian Chadd To: freebsd-xen@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Clock TOD issues (mostly) resolved? X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2009 13:45:59 -0000 G'day, I've just committed some changes to the Xen clock code which should resolve some of the random time jumps people may have seen when the dom0/hypervisor clock was updated. Please test! Adrian From owner-freebsd-xen@FreeBSD.ORG Fri May 29 13:50:03 2009 Return-Path: Delivered-To: freebsd-xen@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD13310657E4 for ; Fri, 29 May 2009 13:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9183E8FC1F for ; Fri, 29 May 2009 13:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4TDo3M9026479 for ; Fri, 29 May 2009 13:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4TDo3GF026474; Fri, 29 May 2009 13:50:03 GMT (envelope-from gnats) Date: Fri, 29 May 2009 13:50:03 GMT Message-Id: <200905291350.n4TDo3GF026474@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/135008: commit references a PR X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2009 13:50:04 -0000 The following reply was made to PR kern/135008; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/135008: commit references a PR Date: Fri, 29 May 2009 13:43:32 +0000 (UTC) Author: adrian Date: Fri May 29 13:43:21 2009 New Revision: 193033 URL: http://svn.freebsd.org/changeset/base/193033 Log: 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 Modified: head/sys/i386/xen/clock.c Modified: head/sys/i386/xen/clock.c ============================================================================== --- head/sys/i386/xen/clock.c Fri May 29 13:36:06 2009 (r193032) +++ head/sys/i386/xen/clock.c Fri May 29 13:43:21 2009 (r193033) @@ -87,6 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* * 32-bit time_t's can't reach leap years before 1904 or after 2036, so we @@ -236,6 +237,15 @@ static void update_wallclock(void) } +static void +add_uptime_to_wallclock(void) +{ + struct timespec ut; + + xen_fetch_uptime(&ut); + timespecadd(&shadow_tv, &ut); +} + /* * Reads a consistent set of time-base values from Xen, into a shadow data * area. Must be called with the xtime_lock held for writing. @@ -331,7 +341,9 @@ clkintr(void *arg) */ if (shadow_tv_version != HYPERVISOR_shared_info->wc_version) { + printf("[XEN] hypervisor wallclock nudged; nudging TOD.\n"); update_wallclock(); + add_uptime_to_wallclock(); tc_setclock(&shadow_tv); } @@ -542,6 +554,7 @@ domu_inittodr(time_t base) struct timespec ts; update_wallclock(); + add_uptime_to_wallclock(); RTC_LOCK; @@ -591,6 +604,7 @@ domu_resettodr(void) op.u.settime.system_time = shadow->system_timestamp; HYPERVISOR_dom0_op(&op); update_wallclock(); + add_uptime_to_wallclock(); } else if (independent_wallclock) { /* notyet */ ; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-xen@FreeBSD.ORG Sat May 30 16:04:23 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DD60106568C; Sat, 30 May 2009 16:04:23 +0000 (UTC) (envelope-from Ron.Carter@cartersweb.net) Received: from cartersweb.net (nc-208-17-66-204.sta.embarqhsd.net [208.17.66.204]) by mx1.freebsd.org (Postfix) with ESMTP id E7D8E8FC08; Sat, 30 May 2009 16:04:22 +0000 (UTC) (envelope-from Ron.Carter@cartersweb.net) Date: Sat, 30 May 2009 11:50:10 -0400 Message-ID: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-class: urn:content-classes:message Thread-Topic: freebsd-xen images X-MimeOLE: Produced By Microsoft Exchange V6.5 thread-index: Acner0Gx1zFfWg0fR5GjIt6/EEJzfwCjqYcg References: From: "Ron Carter" To: "Adrian Chadd" , Cc: Subject: RE: freebsd-xen images X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2009 16:04:23 -0000 Will this work with XenServer 5.0 or Beta 5.5? I saw but have not gotten any information yet but I saw a FreeBSD based image from Citrix that is fully virtualized. I trying to get more information. RC -----Original Message----- From: owner-freebsd-xen@freebsd.org [mailto:owner-freebsd-xen@freebsd.org] On Behalf Of Adrian Chadd Sent: Sunday, May 24, 2009 10:15 AM To: freebsd-xen@freebsd.org Subject: freebsd-xen images I've just written up a wiki page which links to the images that I'm toying with. http://wiki.freebsd.org/AdrianChadd/XenImages My build script is there; there's also notes on what I've done to make a base build/install work as a DomU and how to call makefs to build an initial image. It should be enough for people to bootstrap a FreeBSD/Xen DomU to evaluate. I'm currently trying out the freebsd-6.3-release image that I've built and it is currently uploading for others to test out. It seems slightly more stable than the freebsd releng_6 image. FreeBSD-current is stable except for a repeatable VM page bug which I'm looking at (but Kip will almost certainly beat me to it) and I as of yet haven't successfully built a releng_7 xen image. I hope this has taken all of the mystery out of bootstrapping a FreeBSD/Xen DomU. :) Thanks, Adrian _______________________________________________ freebsd-xen@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-xen To unsubscribe, send any mail to "freebsd-xen-unsubscribe@freebsd.org"