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

RE: [Xen-devel] hypercall_page


  • To: "T S" <thileepan_@xxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Yu, Ke" <ke.yu@xxxxxxxxx>
  • Date: Thu, 13 Apr 2006 13:35:03 +0800
  • Delivery-date: Wed, 12 Apr 2006 22:35:41 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcZesa6l5z8yptz4RmagpgbCU7BwdQAB8evw
  • Thread-topic: [Xen-devel] hypercall_page

Hypercall_page is actually a code page, which contains 32 hypercall entry. 
every entry is something like 

"mov  $__HYPERVISOR_xxx,%eax 
int  $0x82 "

It is initialized in hypercall_page_initialise(void *hypercall_page) at the 
time  when control panel creates the domain. Later, domain can simply the 
corresponding entry to issue a hypercall. 

For the subroutine of the HYPERVISOR_xxx, usually it is do_xxx. For example, 
__HYPERVISOR_sched_op should be do_sched_op. For more information, please refer 
to hypercall_table in xen/arch/x86/x86_{32,64}/entry.S.

Thanks
Ke

T S wrote:
> Hi,
> 
> Can someone let me know what exactly the array "hypercall_page "
> contains? Are they function pointers?
> 
> How do I know which functions are going to be called when a
> HYPERVISOR_xxx is called?
> 
> For instance, when the following asm code is to be executed:
> 
> define _hypercall3(type, sched_op, a1, a2, a3)                     \
> ({                                                              \
>         long __res, __ign1, __ign2, __ign3;                     \
>         asm volatile (                                          \
>                 "call hypercall_page + ("STR(__HYPERVISOR_##name)" *
>                 32)"\ : "=a" (__res), "=b" (__ign1), "=c" (__ign2),  
>                 \ "=d" (__ign3)                                   \
>                 : "1" ((long)(a1)), "2" ((long)(a2)),           \
>                 "3" ((long)(a3))                                \
>                 : "memory" );                                   \
>         (type)__res;                                            \
> })
> 
> The #define for __HYPERVISOR_sched_op is 6
> 
> how do I find out which subroutine is the "call" going to call?
> 
> The above asm code is present in /arch/xen/kernel/hypercall.h
> 
> thanks !
> 
> _________________________________________________________________
> Is your PC infected? Get a FREE online computer virus scan from
> McAfee® Security.
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 
> 
> 
> _______________________________________________
> 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®.