Hi, Do you know how to call hypercall or call some interface function of Xen in the ring1 level. In other words, I want to call hypercall or some interface function of Xen from the Dom0''s kernel module. Thanks. Regards, Cong _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, 2011-09-29 at 21:16 +0100, David Xu wrote:> Hi, > > Do you know how to call hypercall or call some interface function of > Xen in the ring1 level. In other words, I want to call hypercall or > some interface function of Xen from the Dom0''s kernel module. Thanks.The kernel (and it''s modules) are full of uses of hypercalls (as they must be) so I''m not sure what you mean here, what problem are you seeing? Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Please don''t top post and always CC the list. I''ve put xen-devel back this time. On Fri, 2011-09-30 at 15:14 +0100, David Xu wrote:> Hi, > > I modify the bridge module of Dom0 and sniff the packets which go > through Dom0. I want to notify the hypervisor if some special packets > come. So I want to call some interface function which are defined in > libxc (libxenctrl). But if I include the xenctrl.h or some related > head file in the br.c or br_input.c which are parts of bridge module > codes, I will encounter the compiling error (can not find the head > file).Of course you cannot link userspace code into the kernel. If you need access to hypercalls then you have them available in the kernel in raw form in the kernel. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2011/9/30 Ian Campbell <Ian.Campbell@eu.citrix.com>:> Please don''t top post and always CC the list. I''ve put xen-devel back > this time.Sorry for that. I cc the list this time. :)> On Fri, 2011-09-30 at 15:14 +0100, David Xu wrote: >> Hi, >> >> I modify the bridge module of Dom0 and sniff the packets which go >> through Dom0. I want to notify the hypervisor if some special packets >> come. So I want to call some interface function which are defined in >> libxc (libxenctrl). But if I include the xenctrl.h or some related >> head file in the br.c or br_input.c which are parts of bridge module >> codes, I will encounter the compiling error (can not find the head >> file). > > Of course you cannot link userspace code into the kernel. > > If you need access to hypercalls then you have them available in the > kernel in raw form in the kernel. >So how can I call hypercall in raw form? I am not familiar with that. I changed the xen scheduler and add some other parameters and interface to xen credit scheduler. I want to switch the scheduling policy for some specific scenario. Currently I modified the libxc and xm command, so I can use xm command to change the parameters of scheduler and switch the policy. But I want to make it on demand, so I need communicate with scheduler in the Dom0 kernel module which sniffs and analyzes the packets. Thanks. Regards, Cong _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, 2011-09-30 at 15:35 +0100, David Xu wrote:> 2011/9/30 Ian Campbell <Ian.Campbell@eu.citrix.com>: > > Please don''t top post and always CC the list. I''ve put xen-devel back > > this time. > > Sorry for that. I cc the list this time. :) > > > On Fri, 2011-09-30 at 15:14 +0100, David Xu wrote: > >> Hi, > >> > >> I modify the bridge module of Dom0 and sniff the packets which go > >> through Dom0. I want to notify the hypervisor if some special packets > >> come. So I want to call some interface function which are defined in > >> libxc (libxenctrl). But if I include the xenctrl.h or some related > >> head file in the br.c or br_input.c which are parts of bridge module > >> codes, I will encounter the compiling error (can not find the head > >> file). > > > > Of course you cannot link userspace code into the kernel. > > > > If you need access to hypercalls then you have them available in the > > kernel in raw form in the kernel. > > > > So how can I call hypercall in raw form? I am not familiar with that.There are various functions in the kernel to do so. It rather depends which hypercall you want to use, since they are generally subsystem interfaces. e.g. see drivers/xen/events.c for event channel related stuff.> I changed the xen scheduler and add some other parameters and > interface to xen credit scheduler. I want to switch the scheduling > policy for some specific scenario. Currently I modified the libxc and > xm command, so I can use xm command to change the parameters of > scheduler and switch the policy. But I want to make it on demand, so I > need communicate with scheduler in the Dom0 kernel module which sniffs > and analyzes the packets.Having the dom0 kernel be involved with setting hypervisor scheduling parameters doesn''t seem right to me. The more normal way to do this would be to expose the necessary statistics to dom0 userspace and have a daemon which did the heavy lifting. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel