aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/kernel.c
diff options
context:
space:
mode:
authorEmmanuel Ackaouy <ack@xensource.com>2007-01-05 17:34:28 +0000
committerEmmanuel Ackaouy <ack@xensource.com>2007-01-05 17:34:28 +0000
commit6224725e9357f6056cff046ba5da4c52f0bace8c (patch)
tree9ad38da55854dcad3fa52415aaebdb711c59aa85 /xen/common/kernel.c
parentc1990f10a76daa10ea01dd11e9ca6fc92cf55716 (diff)
downloadxen-6224725e9357f6056cff046ba5da4c52f0bace8c.tar.gz
xen-6224725e9357f6056cff046ba5da4c52f0bace8c.tar.bz2
xen-6224725e9357f6056cff046ba5da4c52f0bace8c.zip
Add logic to generate headers reflecting the compatibility mode layout
of hypercall arguments. Provide infrastructure for accessing handles passed from compatibility mode guests. Vector those hypercalls not needing any translation to their native implementations. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/kernel.c')
-rw-r--r--xen/common/kernel.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index 9dc321325e..bf46640526 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -11,11 +11,14 @@
#include <xen/version.h>
#include <xen/sched.h>
#include <xen/shadow.h>
+#include <xen/nmi.h>
#include <xen/guest_access.h>
#include <asm/current.h>
#include <public/nmi.h>
#include <public/version.h>
+#ifndef COMPAT
+
int tainted;
void cmdline_parse(char *cmdline)
@@ -116,11 +119,15 @@ void add_taint(unsigned flag)
tainted |= flag;
}
+# define DO(fn) long do_##fn
+
+#endif
+
/*
* Simple hypercalls.
*/
-long do_xen_version(int cmd, XEN_GUEST_HANDLE(void) arg)
+DO(xen_version)(int cmd, XEN_GUEST_HANDLE(void) arg)
{
switch ( cmd )
{
@@ -230,6 +237,8 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE(void) arg)
return -ENOSYS;
}
+#ifndef COMPAT
+
long register_guest_nmi_callback(unsigned long address)
{
struct vcpu *v = current;
@@ -260,7 +269,9 @@ long unregister_guest_nmi_callback(void)
return 0;
}
-long do_nmi_op(unsigned int cmd, XEN_GUEST_HANDLE(void) arg)
+#endif
+
+DO(nmi_op)(unsigned int cmd, XEN_GUEST_HANDLE(void) arg)
{
struct xennmi_callback cb;
long rc = 0;
@@ -284,12 +295,12 @@ long do_nmi_op(unsigned int cmd, XEN_GUEST_HANDLE(void) arg)
return rc;
}
-long do_vm_assist(unsigned int cmd, unsigned int type)
+DO(vm_assist)(unsigned int cmd, unsigned int type)
{
return vm_assist(current->domain, cmd, type);
}
-long do_ni_hypercall(void)
+DO(ni_hypercall)(void)
{
/* No-op hypercall. */
return -ENOSYS;