WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] hypercall_page

To: "T S" <thileepan_@xxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] hypercall_page
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
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • RE: [Xen-devel] hypercall_page, Yu, Ke <=