All of lore.kernel.org
 help / color / mirror / Atom feed
* where is the location of definition of "do_xen_version"?
@ 2008-03-07  9:45 房海峰
  2008-03-07  9:55 ` Zheng, Shaohui
  0 siblings, 1 reply; 7+ messages in thread
From: 房海峰 @ 2008-03-07  9:45 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1622 bytes --]

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 



房海峰 

[-- Attachment #1.2: Type: text/html, Size: 3279 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: where is the location of definition of "do_xen_version"?
  2008-03-07  9:45 where is the location of definition of "do_xen_version"? 房海峰
@ 2008-03-07  9:55 ` Zheng, Shaohui
       [not found]   ` <200803071849089534309@ncic.ac.cn>
  0 siblings, 1 reply; 7+ messages in thread
From: Zheng, Shaohui @ 2008-03-07  9:55 UTC (permalink / raw)
  To: fanghaifeng, xen-devel

[-- Attachment #1: Type: text/plain, Size: 2646 bytes --]

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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 房海峰
Sent: 2008年3月7日 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 
________________________________________
房海峰 

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Fw: Re: RE: where is the location of definition of"do_xen_version"?
       [not found]   ` <200803071849089534309@ncic.ac.cn>
@ 2008-03-07 10:49     ` 房海峰
  2008-03-07 11:33       ` Daniel Stodden
  2008-03-07 13:07       ` Re: RE: where is the location of definitionof"do_xen_version"? Shan, Haitao
  0 siblings, 2 replies; 7+ messages in thread
From: 房海峰 @ 2008-03-07 10:49 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 3197 bytes --]



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@ncic.ac.cn; 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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 房海峰
Sent: 2008年3月7日 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@lists.xensource.com
http://lists.xensource.com/xen-devel

[-- Attachment #1.2: Type: text/html, Size: 9958 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Fw: Re: RE: where is the location of definition of"do_xen_version"?
  2008-03-07 10:49     ` Fw: Re: RE: where is the location of definition of"do_xen_version"? 房海峰
@ 2008-03-07 11:33       ` Daniel Stodden
  2008-03-07 13:07       ` Re: RE: where is the location of definitionof"do_xen_version"? Shan, Haitao
  1 sibling, 0 replies; 7+ messages in thread
From: Daniel Stodden @ 2008-03-07 11:33 UTC (permalink / raw)
  To: fanghaifeng; +Cc: xen-devel

On Fri, 2008-03-07 at 18:49 +0800, 房海峰 wrote:

it got obfuscated a little lately DO(xen_version) lately. 
see common/kernel.c

-- 
Daniel Stodden
LRR     -      Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München             D-85748 Garching
http://www.lrr.in.tum.de/~stodden         mailto:stodden@cs.tum.edu
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33  3D80 457E 82AE B0D8 735B

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Re: RE: where is the location of definitionof"do_xen_version"?
  2008-03-07 10:49     ` Fw: Re: RE: where is the location of definition of"do_xen_version"? 房海峰
  2008-03-07 11:33       ` Daniel Stodden
@ 2008-03-07 13:07       ` Shan, Haitao
  2008-03-08  3:01         ` 房海峰
  1 sibling, 1 reply; 7+ messages in thread
From: Shan, Haitao @ 2008-03-07 13:07 UTC (permalink / raw)
  To: fanghaifeng, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 3911 bytes --]

Xen/common/kernel.c

#define DO(fn) long do_##fn

 

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

 

________________________________

From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 房海峰
Sent: 2008年3月7日 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@ncic.ac.cn; 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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 房海峰

Sent: 2008年3月7日 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@lists.xensource.com

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


[-- Attachment #1.2: Type: text/html, Size: 33514 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: RE: Re: RE: where is the location of definitionof"do_xen_version"?
  2008-03-07 13:07       ` Re: RE: where is the location of definitionof"do_xen_version"? Shan, Haitao
@ 2008-03-08  3:01         ` 房海峰
  2008-03-08  4:01           ` Shan, Haitao
  0 siblings, 1 reply; 7+ messages in thread
From: 房海峰 @ 2008-03-08  3:01 UTC (permalink / raw)
  To: Shan, Haitao; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 3954 bytes --]

thank you very much for your replying!

and can you tell why xen do it in this way?

and what is the "__guest_handle_ " ?

thanks again.

2008-03-08 



房海峰 



发件人: Shan, Haitao 
发送时间: 2008-03-07  20:54:54 
收件人: fanghaifeng@ncic.ac.cn; xen-devel 
抄送: 
主题: RE: 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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 房海峰
Sent: 2008年3月7日 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@ncic.ac.cn; 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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 房海峰
Sent: 2008年3月7日 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@lists.xensource.com
http://lists.xensource.com/xen-devel

[-- Attachment #1.2: Type: text/html, Size: 36534 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: RE: Re: RE: where is the location of definitionof"do_xen_version"?
  2008-03-08  3:01         ` 房海峰
@ 2008-03-08  4:01           ` Shan, Haitao
  0 siblings, 0 replies; 7+ messages in thread
From: Shan, Haitao @ 2008-03-08  4:01 UTC (permalink / raw)
  To: fanghaifeng; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 5848 bytes --]

You can see include/public/arch-x86/xen.h

/* Structural guest handles introduced in 0x00030201. */

#if __XEN_INTERFACE_VERSION__ >= 0x00030201

#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \

    typedef struct { type *p; } __guest_handle_ ## name

#else

#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \

    typedef type * __guest_handle_ ## name

#endif

 

#define __DEFINE_XEN_GUEST_HANDLE(name, type) \

    ___DEFINE_XEN_GUEST_HANDLE(name, type);   \

    ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)

#define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)

#define __XEN_GUEST_HANDLE(name)        __guest_handle_ ## name

#define XEN_GUEST_HANDLE(name)          __XEN_GUEST_HANDLE(name)

#define set_xen_guest_handle(hnd, val)  do { (hnd).p = val; } while (0)

#ifdef __XEN_TOOLS__

#define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)

#endif

 

But I do not know why they are in these forms. Maybe by doing this, compiler can do some sort of type checking during compiling to avoid unintended programming errors?  I think some big people in the maillist can answer. :-)

 

Best Regards

Shan Haitao

 

________________________________

From: 房海峰 [mailto:fanghaifeng@ncic.ac.cn] 
Sent: 2008年3月8日 11:02
To: Shan, Haitao
Cc: xen-devel
Subject: Re: RE: Re: RE: [Xen-devel] where is the location of definitionof"do_xen_version"?

 

thank you very much for your replying!

 

and can you tell why xen do it in this way?

 

and what is the "__guest_handle_ " ?

 

thanks again.

 

2008-03-08 

________________________________

房海峰 

________________________________

发件人: Shan, Haitao 

发送时间: 2008-03-07  20:54:54 

收件人: fanghaifeng@ncic.ac.cn; xen-devel 

抄送: 

主题: RE: 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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 房海峰
Sent: 2008年3月7日 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@ncic.ac.cn; 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@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of 房海峰

Sent: 2008年3月7日 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@lists.xensource.com

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


[-- Attachment #1.2: Type: text/html, Size: 49059 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-03-08  4:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-07  9:45 where is the location of definition of "do_xen_version"? 房海峰
2008-03-07  9:55 ` Zheng, Shaohui
     [not found]   ` <200803071849089534309@ncic.ac.cn>
2008-03-07 10:49     ` Fw: Re: RE: where is the location of definition of"do_xen_version"? 房海峰
2008-03-07 11:33       ` Daniel Stodden
2008-03-07 13:07       ` Re: RE: where is the location of definitionof"do_xen_version"? Shan, Haitao
2008-03-08  3:01         ` 房海峰
2008-03-08  4:01           ` Shan, Haitao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.