From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: "Nimgaonkar, Satyajeet" <SatyajeetNimgaonkar@my.unt.edu>,
xen-devel@lists.xensource.com
Subject: RE: New Hypercall Declaration
Date: Thu, 30 Sep 2010 15:47:12 -0700 (PDT) [thread overview]
Message-ID: <f7713e49-ccd1-4a39-afef-1a84cb582c86@default> (raw)
In-Reply-To: <12871952FC0E29439F861FA745BCDD8503EB081A@CH1PRD0104MB024.prod.exchangelabs.com>
[-- Attachment #1.1: Type: text/plain, Size: 3235 bytes --]
Do you understand that you must also change the hypervisor to recognize and do something with your new hypercall? Your userland code may actually be working and the hypercall may actually be resulting in an entry into the hypervisor, but unless the hypervisor is modified to recognize the new hypercall (#56) and do something with it, the hypervisor will generate a return value of -1 (essentially saying "I don't recognize this hypercall number").
If you have modified the hypervisor, please share that patch. If not, you will need to modify at least the hypercall_table and the hypercall_args_table in entry.S (under x86, x86_64, and x86_64/compat, or all three, depending on the bit-ness of your hypervisor and guest) and create a do_my_hypercall() routine somewhere. Then of course you will need to ensure that you are properly building, installing, and booting your newly modified hypervisor.
Printk's done inside the hypervisor can be viewed using "xm dmesg" or via a properly configured serial port.
Use "xm info" and look at cc_compile_date to ensure you are booting your newly modified hypervisor.
Hope that helps,
Dan
From: Nimgaonkar, Satyajeet [mailto:SatyajeetNimgaonkar@my.unt.edu]
Sent: Thursday, September 30, 2010 4:03 PM
To: xen-devel@lists.xensource.com
Subject: [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
[-- Attachment #1.2: Type: text/html, Size: 8519 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-09-30 22:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 22:02 New Hypercall Declaration Nimgaonkar, Satyajeet
2010-09-30 22:47 ` Dan Magenheimer [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7713e49-ccd1-4a39-afef-1a84cb582c86@default \
--to=dan.magenheimer@oracle.com \
--cc=SatyajeetNimgaonkar@my.unt.edu \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.