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

[Xen-devel] Declaring new Xen Hypercall

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Declaring new Xen Hypercall
From: "Nimgaonkar, Satyajeet" <SatyajeetNimgaonkar@xxxxxxxxxx>
Date: Tue, 28 Sep 2010 20:06:41 +0000
Accept-language: en-US
Delivery-date: Tue, 28 Sep 2010 13:07:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AQHLX0iqIM5rioc1F0GniPfIvKoVXg==
Thread-topic: Declaring new Xen Hypercall
Hi All,
         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");

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

#include 
</home/satyajeet/Important_Softwares/xen-3.4.3/tools/libxc/xc_private.h>
#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);
         
         /* Hypercall definitions */
         
         DECLARE_HYPERCALL;
         hypercall.op     = __HYPERVISOR_jeet1;
         rc = do_xen_hypercall(handle, &hypercall);
         printf ("Hypercall Details: %d\n", rc);
         
         xc_interface_close(handle);     
         
         return 0;
     
}

The program compiles properly but gives me -1 error for rc. 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

<Prev in Thread] Current Thread [Next in Thread>