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@lists.xensource.com http://lists.xensource.com/xen-devel
If I recall correctly, the assembly language code in Xen that is executed first when a hypercall enters into Xen checks if the hypercall is done from userpace and disallows the call (returning -1) if it is.> -----Original Message----- > From: Nimgaonkar, Satyajeet [mailto:SatyajeetNimgaonkar@my.unt.edu] > Sent: Tuesday, September 28, 2010 2:07 PM > To: xen-devel@lists.xensource.com > Subject: [Xen-devel] 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@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Dan, So is there an alternate route to call a hypercall from userspace programs. Can you please advice? ________________________________________ From: Dan Magenheimer [dan.magenheimer@oracle.com] Sent: Tuesday, September 28, 2010 2:29 PM To: Nimgaonkar, Satyajeet; xen-devel@lists.xensource.com Subject: RE: [Xen-devel] Declaring new Xen Hypercall If I recall correctly, the assembly language code in Xen that is executed first when a hypercall enters into Xen checks if the hypercall is done from userpace and disallows the call (returning -1) if it is.> -----Original Message----- > From: Nimgaonkar, Satyajeet [mailto:SatyajeetNimgaonkar@my.unt.edu] > Sent: Tuesday, September 28, 2010 2:07 PM > To: xen-devel@lists.xensource.com > Subject: [Xen-devel] 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@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Open /proc/xen/privcmd and perform ioctl(IOCTL_PRIVCMD_HYPERCALL) on the file handle you get back. See many examples in tools/libxc. -- Keir On 28/09/2010 21:34, "Nimgaonkar, Satyajeet" <SatyajeetNimgaonkar@my.unt.edu> wrote:> Hi Dan, > So is there an alternate route to call a hypercall from userspace > programs. Can you please advice? > > ________________________________________ > From: Dan Magenheimer [dan.magenheimer@oracle.com] > Sent: Tuesday, September 28, 2010 2:29 PM > To: Nimgaonkar, Satyajeet; xen-devel@lists.xensource.com > Subject: RE: [Xen-devel] Declaring new Xen Hypercall > > If I recall correctly, the assembly language code in Xen > that is executed first when a hypercall enters into Xen > checks if the hypercall is done from userpace and disallows > the call (returning -1) if it is. > >> -----Original Message----- >> From: Nimgaonkar, Satyajeet [mailto:SatyajeetNimgaonkar@my.unt.edu] >> Sent: Tuesday, September 28, 2010 2:07 PM >> To: xen-devel@lists.xensource.com >> Subject: [Xen-devel] 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@lists.xensource.com >> http://lists.xensource.com/xen-devel > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Or, if this is for a hypervisor-centric class project and you just want to see it work rather than submit your work into mainline Xen... and don''t want/need to learn all the tools/libraries/Linux code to use privcmd/ioctl... you could just find the assembly code in Xen that rejects the userland hypercall and comment it out. :-)> -----Original Message----- > From: Keir Fraser [mailto:keir@xen.org] > Sent: Tuesday, September 28, 2010 2:40 PM > To: Nimgaonkar, Satyajeet; Dan Magenheimer; xen- > devel@lists.xensource.com > Subject: Re: [Xen-devel] Declaring new Xen Hypercall > > Open /proc/xen/privcmd and perform ioctl(IOCTL_PRIVCMD_HYPERCALL) on > the > file handle you get back. See many examples in tools/libxc. > > -- Keir > > On 28/09/2010 21:34, "Nimgaonkar, Satyajeet" > <SatyajeetNimgaonkar@my.unt.edu> wrote: > > > Hi Dan, > > So is there an alternate route to call a hypercall from > userspace > > programs. Can you please advice? > > > > ________________________________________ > > From: Dan Magenheimer [dan.magenheimer@oracle.com] > > Sent: Tuesday, September 28, 2010 2:29 PM > > To: Nimgaonkar, Satyajeet; xen-devel@lists.xensource.com > > Subject: RE: [Xen-devel] Declaring new Xen Hypercall > > > > If I recall correctly, the assembly language code in Xen > > that is executed first when a hypercall enters into Xen > > checks if the hypercall is done from userpace and disallows > > the call (returning -1) if it is. > > > >> -----Original Message----- > >> From: Nimgaonkar, Satyajeet [mailto:SatyajeetNimgaonkar@my.unt.edu] > >> Sent: Tuesday, September 28, 2010 2:07 PM > >> To: xen-devel@lists.xensource.com > >> Subject: [Xen-devel] 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@lists.xensource.com > >> http://lists.xensource.com/xen-devel > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Keir, Can you advice me which file would be the best example for this. I am currently looking at xc_linux.c. Is it a good example Thanks.. ________________________________________ From: Keir Fraser [keir.xen@gmail.com] on behalf of Keir Fraser [keir@xen.org] Sent: Tuesday, September 28, 2010 2:40 PM To: Nimgaonkar, Satyajeet; Dan Magenheimer; xen-devel@lists.xensource.com Subject: Re: [Xen-devel] Declaring new Xen Hypercall Open /proc/xen/privcmd and perform ioctl(IOCTL_PRIVCMD_HYPERCALL) on the file handle you get back. See many examples in tools/libxc. -- Keir On 28/09/2010 21:34, "Nimgaonkar, Satyajeet" <SatyajeetNimgaonkar@my.unt.edu> wrote:> Hi Dan, > So is there an alternate route to call a hypercall from userspace > programs. Can you please advice? > > ________________________________________ > From: Dan Magenheimer [dan.magenheimer@oracle.com] > Sent: Tuesday, September 28, 2010 2:29 PM > To: Nimgaonkar, Satyajeet; xen-devel@lists.xensource.com > Subject: RE: [Xen-devel] Declaring new Xen Hypercall > > If I recall correctly, the assembly language code in Xen > that is executed first when a hypercall enters into Xen > checks if the hypercall is done from userpace and disallows > the call (returning -1) if it is. > >> -----Original Message----- >> From: Nimgaonkar, Satyajeet [mailto:SatyajeetNimgaonkar@my.unt.edu] >> Sent: Tuesday, September 28, 2010 2:07 PM >> To: xen-devel@lists.xensource.com >> Subject: [Xen-devel] 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@lists.xensource.com >> http://lists.xensource.com/xen-devel > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Dan, Let me first try the approach suggested by Keir, if that does not work I will try yours. By the way can you specifically tell me where can I comment out this assembly code. Thanks. ________________________________________ From: Dan Magenheimer [dan.magenheimer@oracle.com] Sent: Tuesday, September 28, 2010 2:53 PM To: Keir Fraser; Nimgaonkar, Satyajeet; xen-devel@lists.xensource.com Subject: RE: [Xen-devel] Declaring new Xen Hypercall Or, if this is for a hypervisor-centric class project and you just want to see it work rather than submit your work into mainline Xen... and don''t want/need to learn all the tools/libraries/Linux code to use privcmd/ioctl... you could just find the assembly code in Xen that rejects the userland hypercall and comment it out. :-)> -----Original Message----- > From: Keir Fraser [mailto:keir@xen.org] > Sent: Tuesday, September 28, 2010 2:40 PM > To: Nimgaonkar, Satyajeet; Dan Magenheimer; xen- > devel@lists.xensource.com > Subject: Re: [Xen-devel] Declaring new Xen Hypercall > > Open /proc/xen/privcmd and perform ioctl(IOCTL_PRIVCMD_HYPERCALL) on > the > file handle you get back. See many examples in tools/libxc. > > -- Keir > > On 28/09/2010 21:34, "Nimgaonkar, Satyajeet" > <SatyajeetNimgaonkar@my.unt.edu> wrote: > > > Hi Dan, > > So is there an alternate route to call a hypercall from > userspace > > programs. Can you please advice? > > > > ________________________________________ > > From: Dan Magenheimer [dan.magenheimer@oracle.com] > > Sent: Tuesday, September 28, 2010 2:29 PM > > To: Nimgaonkar, Satyajeet; xen-devel@lists.xensource.com > > Subject: RE: [Xen-devel] Declaring new Xen Hypercall > > > > If I recall correctly, the assembly language code in Xen > > that is executed first when a hypercall enters into Xen > > checks if the hypercall is done from userpace and disallows > > the call (returning -1) if it is. > > > >> -----Original Message----- > >> From: Nimgaonkar, Satyajeet [mailto:SatyajeetNimgaonkar@my.unt.edu] > >> Sent: Tuesday, September 28, 2010 2:07 PM > >> To: xen-devel@lists.xensource.com > >> Subject: [Xen-devel] 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@lists.xensource.com > >> http://lists.xensource.com/xen-devel > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi, The best way to go about this would be, create a new/edit existing library which will have wrappers for your hypercall and use those wrappers from user-space. This would make more sense when your hypercall is for a whole new purpose :) -- Srujan D. Kotikela On Tue, Sep 28, 2010 at 4:00 PM, Nimgaonkar, Satyajeet < SatyajeetNimgaonkar@my.unt.edu> wrote:> Dan, > Let me first try the approach suggested by Keir, if that does not > work I will try yours. By the way can you specifically tell me where can I > comment out this assembly code. > Thanks. > ________________________________________ > From: Dan Magenheimer [dan.magenheimer@oracle.com] > Sent: Tuesday, September 28, 2010 2:53 PM > To: Keir Fraser; Nimgaonkar, Satyajeet; xen-devel@lists.xensource.com > Subject: RE: [Xen-devel] Declaring new Xen Hypercall > > Or, if this is for a hypervisor-centric class project and > you just want to see it work rather than submit your work > into mainline Xen... and don''t want/need to learn all the > tools/libraries/Linux code to use privcmd/ioctl... > > you could just find the assembly code in Xen that rejects > the userland hypercall and comment it out. :-) > > > -----Original Message----- > > From: Keir Fraser [mailto:keir@xen.org] > > Sent: Tuesday, September 28, 2010 2:40 PM > > To: Nimgaonkar, Satyajeet; Dan Magenheimer; xen- > > devel@lists.xensource.com > > Subject: Re: [Xen-devel] Declaring new Xen Hypercall > > > > Open /proc/xen/privcmd and perform ioctl(IOCTL_PRIVCMD_HYPERCALL) on > > the > > file handle you get back. See many examples in tools/libxc. > > > > -- Keir > > > > On 28/09/2010 21:34, "Nimgaonkar, Satyajeet" > > <SatyajeetNimgaonkar@my.unt.edu> wrote: > > > > > Hi Dan, > > > So is there an alternate route to call a hypercall from > > userspace > > > programs. Can you please advice? > > > > > > ________________________________________ > > > From: Dan Magenheimer [dan.magenheimer@oracle.com] > > > Sent: Tuesday, September 28, 2010 2:29 PM > > > To: Nimgaonkar, Satyajeet; xen-devel@lists.xensource.com > > > Subject: RE: [Xen-devel] Declaring new Xen Hypercall > > > > > > If I recall correctly, the assembly language code in Xen > > > that is executed first when a hypercall enters into Xen > > > checks if the hypercall is done from userpace and disallows > > > the call (returning -1) if it is. > > > > > >> -----Original Message----- > > >> From: Nimgaonkar, Satyajeet [mailto:SatyajeetNimgaonkar@my.unt.edu] > > >> Sent: Tuesday, September 28, 2010 2:07 PM > > >> To: xen-devel@lists.xensource.com > > >> Subject: [Xen-devel] 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@lists.xensource.com > > >> http://lists.xensource.com/xen-devel > > > > > > _______________________________________________ > > > Xen-devel mailing list > > > Xen-devel@lists.xensource.com > > > http://lists.xensource.com/xen-devel > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel