WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] XEN 4.0.2-rc2 - using OCAML xenstored -- xend not starti

To: Yuvraj Agarwal <yuvraj@xxxxxxxxxxx>
Subject: RE: [Xen-devel] XEN 4.0.2-rc2 - using OCAML xenstored -- xend not starting?
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Thu, 10 Feb 2011 18:08:06 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Vincent Hanquez <Vincent.Hanquez@xxxxxxxxxxxxx>
Delivery-date: Thu, 10 Feb 2011 10:08:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <038501cbc94b$6d808320$48818960$@cs.ucsd.edu>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <08f801cbc7b1$f59dcf10$e0d96d30$@cs.ucsd.edu> <4D524EB7.5040408@xxxxxxxxxxxxx> <1297327365.28185.1198.camel@xxxxxxxxxxxxxxxxxxxxxx> <038501cbc94b$6d808320$48818960$@cs.ucsd.edu>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
> 
> <snip>
> 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.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel