[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [ Help! ] how is ctx->xch in xen/tools/libxl/xl_cmdimpl.c initialized?



Thank you very much!
I find the function pointer point to :
.u.privcmd.hypercall = &linux_privcmd_hypercall   Âon Line 423

but this function:linux_privcmd_hypercall() inÂxen4.2.1/tools/libxc/xc_linux_osdep.c, Line 113
goes to a python script:
xen4.2.1/tools/python/xen/util/SSHTransport.py, Line 26
then it seems to call a function nameÂlwip_ioctl:
> return lwip_ioctl(files[fd],socket.fd, FIONBIO, &nblock);
this function does not belong to xen

I just want to find out how xl comnand works, does it actually call this function?
The code of Xen of this part have no any commons..It's too hard to understand.
Help me please Orz


On Fri, Apr 12, 2013 at 2:41 AM, Wei Liu <wei.liu2@xxxxxxxxxx> wrote:
On Thu, Apr 11, 2013 at 02:06:58PM +0100, Li Yechen wrote:
> I try to trap the xl command: main_memset() in tools/libxl/xl.h
> and it goes to do_xen_hypercall(xch, *hypercall) on line 246, xen4.1.2/tools/libxc/xc_private.c
>
> this function then call: xch->ops->u.privcmd.hypercall() which is a function pointer
> the xch is a member of global varible: libxl_ctx *ctx, which is in line66ï tools/libxl/xl_cmdimpl.c
>
> then I can't find where the function pointer goes to, nor does the place where this function pointer is initialized.
> Any one is familiar with this variable? Help me please! Thank you very much!
>

xch is a handle to Xen privcmd. Please look at OS dependent code in
libxc such as xc_linux_osdep.c


Wei.

> --
> Yechen Li
>
> Team of System Virtualization and Cloud Computing
> School of Electronic Engineering Âand Computer Science,
> Peking University, China
>
> Nothing is impossible because impossible itself Âsays: " I'm possible "
> lccycc From PKU

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel




--
Yechen Li

Team of System Virtualization and Cloud ComputingÂ
School of Electronic Engineering and Computer Science

Peking University, China

Nothing is impossible because impossible itself Âsays: " I'm possible "
lccycc From PKU
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.