aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/sysctl.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-09 11:11:59 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-09 11:11:59 +0000
commite1bc13a960bab6c8efd73200138efeb31a5aa35f (patch)
tree7de4f5aef090bdf6d2ecbfc9ca78b69febd3696a /xen/common/sysctl.c
parentf064d42ef8af59f9ae7378fe5b0ec8dd7f2a40ca (diff)
downloadxen-e1bc13a960bab6c8efd73200138efeb31a5aa35f.tar.gz
xen-e1bc13a960bab6c8efd73200138efeb31a5aa35f.tar.bz2
xen-e1bc13a960bab6c8efd73200138efeb31a5aa35f.zip
xm: New command 'debug-keys' to inject debug-key events into Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/common/sysctl.c')
-rw-r--r--xen/common/sysctl.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index 789e643ff2..0cba2c1164 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -18,6 +18,7 @@
#include <xen/console.h>
#include <xen/iocap.h>
#include <xen/guest_access.h>
+#include <xen/keyhandler.h>
#include <asm/current.h>
#include <public/sysctl.h>
@@ -121,6 +122,20 @@ long do_sysctl(XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
break;
#endif
+ case XEN_SYSCTL_debug_keys:
+ {
+ char c;
+ uint32_t i;
+
+ for ( i = 0; i < op->u.debug_keys.nr_keys; i++ )
+ {
+ if ( copy_from_guest_offset(&c, op->u.debug_keys.keys, i, 1) )
+ return -EFAULT;
+ handle_keypress(c, guest_cpu_user_regs());
+ }
+ }
+ break;
+
default:
ret = arch_do_sysctl(op, u_sysctl);
break;