From owner-freebsd-current@FreeBSD.ORG Thu Jan 9 18:50:56 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 157068D1; Thu, 9 Jan 2014 18:50:56 +0000 (UTC) Received: from smtpauth3.wiscmail.wisc.edu (wmauth3.doit.wisc.edu [144.92.197.226]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF75B12CB; Thu, 9 Jan 2014 18:50:55 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=UTF-8 Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) id <0MZ500200CXBNW00@smtpauth3.wiscmail.wisc.edu>; Thu, 09 Jan 2014 12:50:48 -0600 (CST) X-Spam-PmxInfo: Server=avs-3, Version=6.0.3.2322014, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.1.9.183915, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from wanderer.tachypleus.net (pool-72-66-107-173.washdc.fios.verizon.net [72.66.107.173]) by smtpauth3.wiscmail.wisc.edu (Oracle Communications Messaging Server 7u4-27.01(7.0.4.27.0) 64bit (built Aug 30 2012)) with ESMTPSA id <0MZ500510DOK7500@smtpauth3.wiscmail.wisc.edu>; Thu, 09 Jan 2014 12:50:46 -0600 (CST) Message-id: <52CEEF84.2070701@freebsd.org> Date: Thu, 09 Jan 2014 13:50:44 -0500 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 To: =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= , Julien Grall Subject: Re: [Xen-devel] [PATCH v9 15/19] xen: create a Xen nexus to use in PV/PVH References: <1388677433-49525-1-git-send-email-roger.pau@citrix.com> <1388677433-49525-16-git-send-email-roger.pau@citrix.com> <52C9D4CA.6070403@linaro.org> <52CA78DE.9060502@citrix.com> <52CA9481.4090703@linaro.org> <52CBBB05.6020104@citrix.com> <52CC0EE8.6060205@linaro.org> <52CECEAA.107@citrix.com> In-reply-to: <52CECEAA.107@citrix.com> X-Enigmail-Version: 1.6 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: Thu, 09 Jan 2014 18:50:56 -0000 On 01/09/14 11:30, Roger Pau Monné wrote: > On 07/01/14 15:27, Julien Grall wrote: >> On 01/07/2014 08:29 AM, Roger Pau Monné wrote: >>> On 06/01/14 12:33, Julien Grall wrote: >>>> >>>> On 01/06/2014 09:35 AM, Roger Pau Monné wrote: >>>>> On 05/01/14 22:55, Julien Grall wrote: >>>>>> >>>>>> On 01/02/2014 03:43 PM, Roger Pau Monne wrote: >>>>>>> Introduce a Xen specific nexus that is going to be in charge for >>>>>>> attaching Xen specific devices. >>>>>> Now that we have a xenpv bus, do we really need a specific nexus for >>>>>> Xen? >>>>>> We should be able to use the identify callback of xenpv to create the >>>>>> bus. >>>>>> >>>>>> The other part of this patch can be merged in the patch #14 "Introduce >>>>>> xenpv bus and a dummy pvcpu device". >>>>> On x86 at least we need the Xen specific nexus, or we will fall back to >>>>> use the legacy nexus which is not what we really want. >>>>> >>>> Oh right, in any case can we use the identify callback of xenpv to add >>>> the bus? >>> AFAICT this kind of bus devices don't have a identify routine, and they >>> are usually added manually from the specific nexus, see acpi or legacy. >>> Could you add the device on ARM when you detect that you are running as >>> a Xen guest, or in the generic ARM nexus if Xen is detected? >> Is there any reason to not add identify callback? If it's possible, I >> would like to avoid as much as possible #ifdef XENHVM in ARM code. > Maybe the x86 world is really different from the ARM world in how nexus > works, but I rather prefer to have a #ifdef XENHVM and a BUS_ADD_CHILD > that attaches the xenpv bus in the generic ARM nexus rather than having > something that completely diverges from what buses usually do in > FreeBSD. It's going to be much more difficult to track in case of bugs, > and it's not what people expects, but that's just my opinion. I can > certainly add the identify routine if there's an agreement that it's the > best way to deal with it. > > Roger. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > Attaching sub-devices to nexus using device_identify() is the usual way to do this kind of thing. Note that if you do this, your device_probe() routine should return BUS_PROBE_NOWILDCARD to deal with platforms (ARM, MIPS, PowerPC, sparc64) with real autoconfigured devices hanging directly from nexus. -Nathan