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

[Xen-devel] New Hypercall Declaration



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
_______________________________________________
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®.