xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Questions about XEN hypercalls
       [not found] <CAK-vE-XKVrF6ww6PH1RCfwhBoNo74B3Qsn7JD6EvyZZPVOBS4A@mail.gmail.com>
@ 2013-01-14  8:36 ` Mina Jafari
  2013-01-14  9:36   ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Mina Jafari @ 2013-01-14  8:36 UTC (permalink / raw)
  To: xen-devel


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

Hi,
I want to declare a new hypercall in xen,i saw this post here
http://www.gossamer-threads.com/lists/xen/devel/186927
and I follow almost like it,but it doesnt work. I have some questions,I
really appreciate if anybody can help.
I did the fowllowing steps:

*1)Add my hypercall in xen.h ---- #define __HYPERVISOR_test 56 *

*2) Added it to entry.S - hypercall table ---- .quad do_mca /* 48 */
.quad do_test /* 56 */
- hypercall_args_table ---- .byte 1 /* do_mca */ /* 48 */
.byte 0 /* do_test */ /* 56 */

3) Then declared my hypercall in asm-x86/hypercall.h ---- void do_test(void);


4) Then calling it in schedule.c in xen/common --- void do_test(void){

printk ("Successfull Hypercall made to __HYPERVISOR_test");
*
*}*

I noticed that some hypercalls are defined as :
**
*
*
*int hypercall_test(int handle){ *
*int rc;
int arg=0;
//int cmd=1;
//
//int test;
/* Hypercall definitions */

DECLARE_HYPERCALL;
hypercall.op = __HYPERVISOR_jeet1;
rc = do_xen_hypercall(handle, &hypercall);
hypercall.arg[0] = 0;
hypercall.arg[1] = (unsigned long)&arg;
//printf ("Hypercall Details: %d\n", rc);
//xc_interface_close(handle);
return rc;
}

*but some of them are not defined this way using handler and ...
why ? what is the difference of them?
the other are just defined as :
....do_foo_bar(...)
 and how should I know where and in which file I should define my hypercall?
*
*

and as I followed the steps in that post I get this error:
*domain_build.c:1178:1: error: implicit declaration of function ‘do_test’
*I invoked my hypercall in this file once with rc and handler and once
without them just : do_test(); but both returned this error.
I dont want to invoke my hypercall in user mode so I didn't invoke it in a
user program.

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

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

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

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

* Re: Questions about XEN hypercalls
  2013-01-14  8:36 ` Questions about XEN hypercalls Mina Jafari
@ 2013-01-14  9:36   ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2013-01-14  9:36 UTC (permalink / raw)
  To: Mina Jafari, xen-devel

On 14/01/2013 08:36, "Mina Jafari" <ai.minajafari@gmail.com> wrote:

> and as I followed the steps in that post I get this error:
> domain_build.c:1178:1: error: implicit declaration of function Œdo_test¹
> I invoked my hypercall in this file once with rc and handler and once without
> them just : do_test(); but both returned this error.

domain_build.c is a Xen hypervisor source file. You're not attempting a
hypercall, but merely a normal function call.

 -- Keir

> I dont want to invoke my hypercall in user mode so I didn't invoke it in a
> user program.

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

end of thread, other threads:[~2013-01-14  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAK-vE-XKVrF6ww6PH1RCfwhBoNo74B3Qsn7JD6EvyZZPVOBS4A@mail.gmail.com>
2013-01-14  8:36 ` Questions about XEN hypercalls Mina Jafari
2013-01-14  9:36   ` Keir Fraser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).