Date: Tue, 14 Jan 2014 15:41:40 +0000 From: Julien Grall <julien.grall@linaro.org> To: Roger Pau Monne <roger.pau@citrix.com> Cc: xen-devel@lists.xen.org, julien.grall@citrix.com, freebsd-xen@freebsd.org, freebsd-current@freebsd.org, kib@freebsd.org, gibbs@freebsd.org Subject: Re: [PATCH v10 14/20] xen: introduce xenpv bus and a dummy pvcpu device Message-ID: <52D55AB4.4010504@linaro.org> In-Reply-To: <1389711582-66908-15-git-send-email-roger.pau@citrix.com> References: <1389711582-66908-1-git-send-email-roger.pau@citrix.com> <1389711582-66908-15-git-send-email-roger.pau@citrix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 01/14/2014 02:59 PM, Roger Pau Monne wrote: > +static int > +xenpv_attach(device_t dev) > +{ > + device_t child; > + > + if (xen_hvm_domain()) { > + device_t xenpci; > + devclass_t dc; > + > + /* Make sure xenpci has been attached */ > + dc = devclass_find("xenpci"); > + if (dc == NULL) > + panic("unable to find xenpci devclass"); > + > + xenpci = devclass_get_device(dc, 0); > + if (xenpci == NULL) > + panic("unable to find xenpci device"); > + > + if (!device_is_attached(xenpci)) > + panic("trying to attach xenpv before xenpci"); > + } Can you use the identify method to add the xenpci device? As I said earlier, I will reuse this code for ARM guest and this device is not used on this architecture. -- Julien Grall
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52D55AB4.4010504>