From: Ian Campbell Subject: RE: XEN 4.0.2-rc2 - using OCAML xenstored -- xend not starting? Date: Thu, 10 Feb 2011 18:08:06 +0000 Message-ID: <1297361286.3221.687.camel@localhost.localdomain> References: <08f801cbc7b1$f59dcf10$e0d96d30$@cs.ucsd.edu> <4D524EB7.5040408@eu.citrix.com> <1297327365.28185.1198.camel@zakaz.uk.xensource.com> <038501cbc94b$6d808320$48818960$@cs.ucsd.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <038501cbc94b$6d808320$48818960$@cs.ucsd.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Yuvraj Agarwal Cc: "xen-devel@lists.xensource.com" , Vincent Hanquez List-Id: xen-devel@lists.xenproject.org On Thu, 2011-02-10 at 17:53 +0000, Yuvraj Agarwal wrote: > Hi Ian and Vincent, > > Thank you for your responses - There are several possible issues it seems: No, just one -- the event channel one. > ** I actually have both /dev/xen/eventchn and /dev/xen/evtchn > but no /dev/xen/gntdev currently? AFAIK oxenstored does not use gntdev. > root@EM:/home/yuvraj# > > ** It also looks like the minor numbers are mixed up, for example /proc/misc > shows minor number 63 also for vga_arbitrer? Not sure if that matters. The misc device minor numbers are completely dynamic so becoming "mixed up" is normal. The bug is that this version of oxenstored hardcodes a specific minor number, which is wrong. It also uses the device name /dev/xen/eventchn which is different to the /dev/xen/evtchn that the system creates, but that's a minor aside. > root@EM:/home/yuvraj# cat /proc/misc > < snip > > 59 gntdev > 60 evtchn > < snip > > 63 vga_arbiter > root@EM:/home/yuvraj# [...] > root@EM:/home/yuvraj# strace -f /usr/bin/xenstored --no-fork > > > open("/dev/xen/eventchn", O_RDWR) = 6 So here you open /dev/xen/eventchn, which oxenstored created as 10:63. But, as shown in /proc/misc above, the event channel driver actually ends up with minor 60 on this kernel and so the device you have just opened is the vga_arbiter, whatever that is. Hence... > ioctl(6, EVIOCGVERSION, 0x7fffd0cd3e30) = -1 ENOTTY (Inappropriate ioctl for > device) ... this fails, since that ioctl is not valid for the vga_arbiter. > Is there a way I can fix (e.g. a patch I can apply) this on my end? Yes. Apply the patch I linked to in my previous mail (e.g. http://xenbits.xensource.com/xen-unstable.hg?rev/e7b55cc5533a) to the tree under tools/ocaml-xenstored. You may need to adjust the paths in the (hopefully) obvious way. This patch causes oxenstored to use the exiting evtchn device node which is correctly created by udev with the correct minor number. Ian.