All of lore.kernel.org
 help / color / mirror / Atom feed
* New Hypercall Declaration
@ 2010-09-30 22:02 Nimgaonkar, Satyajeet
  2010-09-30 22:47 ` Dan Magenheimer
  0 siblings, 1 reply; 9+ messages in thread
From: Nimgaonkar, Satyajeet @ 2010-09-30 22:02 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com


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

Hello Xen Developers,

 I am currently working on declaring a new hypercall in Xen.
For this i have declared my hypercall in xen.h -
#define __HYPERVISOR_jeet1                56

Then I modified the xcom_privcmd.c to accomodate my hypercall -
         case __HYPERVISOR_jeet1:
                 printk("Successfull Hypercall made to
__HYPERVISOR_jeet1");

I defined the structure for the Hypercall in xc_domain.c

int hypercall_test(int handle){

    int rc;

    /* Hypercall definitions */

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

And then I am calling this Hypercall through an user level program-

#include <xenctrl.h>
#include <stdio.h>



int main(){

     printf("Attempt to invoke the hypercall: __HYPERVISOR_jeet1\n");
     int handle, rc;

         /* Acquire Hypervisor Interface Handle.
            This handle goes as the first argument for the function do_xen_hypercall()
         */

     handle = xc_interface_open();
     printf ("Acquired handle to Xen Hypervisor:%d\n",handle);


     rc = hypercall_test(handle);
     printf ("Hypercall Details: %d\n", rc);

     xc_interface_close(handle);

     return 0;

}


The program compiles properly but gives me -1 error for rc. I have posted the same query and I got replies on it. But even after trying many things, I am still stuck with this problem. Can anyone please tell me what I am doing wrong here. Also please tell me where
should I view the output of printk in xen.

Thanks in advance.

Regards,
Satyajeet Nimgaonkar

[-- Attachment #1.2: Type: text/html, Size: 3553 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] 9+ messages in thread

end of thread, other threads:[~2010-10-11 21:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-30 22:02 New Hypercall Declaration Nimgaonkar, Satyajeet
2010-09-30 22:47 ` Dan Magenheimer
2010-09-30 22:55   ` Nimgaonkar, Satyajeet
2010-10-07 17:36   ` Nimgaonkar, Satyajeet
2010-10-07 18:07     ` Dan Magenheimer
2010-10-07 19:11       ` Keir Fraser
2010-10-07 19:28       ` Nimgaonkar, Satyajeet
2010-10-07 19:39         ` Dan Magenheimer
2010-10-11 21:46           ` Nimgaonkar, Satyajeet

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.