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

RE: Re: RE: [Xen-devel] where is the location of definitionof"do_xen_version"?


  • To: <fanghaifeng@xxxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Shan, Haitao" <haitao.shan@xxxxxxxxx>
  • Date: Fri, 7 Mar 2008 21:07:22 +0800
  • Delivery-date: Fri, 07 Mar 2008 05:12:51 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AciAQTp6Y+dT7xNVSGqnxBBkq1X59QAErhmQ
  • Thread-topic: Re: RE: [Xen-devel] where is the location of definitionof"do_xen_version"?

Xen/common/kernel.c

#define DO(fn) long do_##fn

 

DO(xen_version) )(int cmd, XEN_GUEST_HANDLE(void) arg)

 


From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 房海峰
Sent: 2008
37 18:50
To: xen-devel
Subject: Fw: Re: RE: [Xen-devel] where is the location of definitionof"do_xen_version"?

 

 

 

2008-03-07


房海峰


发件人: 房海峰

发送时间: 2008-03-07 18:49:08

收件人: Zheng, Shaohui

抄送:

主题: Re: RE: [Xen-devel] where is the location of definition of"do_xen_version"?

 

thanks for you!

but the function you found is running in the user-space.

what i need is the function as a hypercall.

 

 

2008-03-07


房海峰


发件人: Zheng, Shaohui

发送时间: 2008-03-07  17:46:52

收件人: fanghaifeng@xxxxxxxxxx; xen-devel

抄送:

主题: RE: [Xen-devel] where is the location of definition of"do_xen_version"?

tools/libxc/xc_private.h

the start line  is 88.

88 static inline int do_xen_version(int xc_handle, int cmd, void *dest)

 89 {

 90     DECLARE_HYPERCALL;

 91

 92     hypercall.op     = __HYPERVISOR_xen_version;

 93     hypercall.arg[0] = (unsigned long) cmd;

 94     hypercall.arg[1] = (unsigned long) dest;

 95

 96     return do_xen_hypercall(xc_handle, &hypercall);

 97 }

Ctags can help you find the definition a function.

Just run the following commands.

cd xen-src-dir

ctags -R

vim -t do_xen_version

then you got it.

--

Best Regards

Shaohui

________________________________________

From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 房海峰

Sent: 200837 17:46

To: xen-devel

Subject: [Xen-devel] where is the location of definition of "do_xen_version"?

hi, my friends:

 

Currently, i am studying the way of hypercall's implementation.

i have already known the flow of hypercall's execuation, and i decided to add a new hypercall into the Xen.

first, i want to know the detail of one hypercall function, for example, "do_xen_version", but i can not find

the location of definition of "do_xen_version". who can help me?

 

i have get some resualts as follows:

 

[root@vt-0 xen-3.1.0-src]# find ./ -name "*.*" | xargs grep "do_xen_version"

./xen/include/xen/hypercall.h:do_xen_version(

Binary file ./xen/common/built_in.o matches

Binary file ./xen/common/kernel.o matches

./xen/arch/x86/x86_32/entry.S:        .long do_xen_version

./xen/arch/x86/x86_32/entry.S:        .byte 2 /* do_xen_version       */

Binary file ./xen/arch/x86/x86_32/built_in.o matches

Binary file ./xen/arch/x86/x86_32/entry.o matches

./xen/arch/x86/x86_64/entry.S:        .quad do_xen_version

./xen/arch/x86/x86_64/entry.S:        .byte 2 /* do_xen_version       */

Binary file ./xen/arch/x86/built_in.o matches

Binary file ./xen/arch/x86/hvm/hvm.o matches

Binary file ./xen/arch/x86/hvm/built_in.o matches

./xen/arch/ia64/linux-xen/entry.S:      data8 do_xen_version

./xen/arch/powerpc/powerpc64/hypercall_table.S:        .quad do_xen_version

Binary file ./dist/install/boot/xen-syms-3.1.0 matches

./tools/libxc/xc_private.c:    rc = do_xen_version(xc_handle, cmd, arg);

./tools/libxc/xc_private.h:static inline int do_xen_version(int xc_handle, int cmd, void *dest)

 

but the "do_xen_version" is not in those above.

 

thanks a lots.

 

www.ict.ac.cn

2008-03-07 

________________________________________

房海峰 

_______________________________________________

Xen-devel mailing list

Xen-devel@xxxxxxxxxxxxxxxxxxx

http://lists.xensource.com/xen-devel

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

 


Rackspace

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