* [PATCH 17/24] [xen-unstable.hg] specifically whitelist VIRQ_DOM_EXC as a virq that may be redirected to a domU via new hypercall
@ 2009-03-23 15:21 Alex Zeffertt
0 siblings, 0 replies; only message in thread
From: Alex Zeffertt @ 2009-03-23 15:21 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
[-- Attachment #1: Type: text/plain, Size: 2 bytes --]
[-- Attachment #2: xen_virq_handler_dom_exc --]
[-- Type: text/plain, Size: 2249 bytes --]
Whitelists VIRQ_DOM_EXC for handling, permissions exception.
I sent these to Keir in an earlier state. See the explanation with
xen_virq_handler_api.
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
---
diff -r a8d818fa0ec9 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c Wed Mar 18 15:50:31 2009 +0000
+++ b/xen/arch/ia64/xen/xensetup.c Wed Mar 18 15:56:13 2009 +0000
@@ -29,6 +29,7 @@
#include <asm/iosapic.h>
#include <xen/softirq.h>
#include <xen/rcupdate.h>
+#include <xen/event.h>
#include <xsm/acm/acm_hooks.h>
#include <asm/sn/simulator.h>
#include <asm/sal.h>
@@ -665,6 +666,8 @@
dom0->is_privileged = 1;
dom0->target = NULL;
+ set_global_virq_handler(dom0, VIRQ_DOM_EXC);
+
/*
* We're going to setup domain0 using the module(s) that we stashed safely
* above our heap. The second module, if present, is an initrd ramdisk.
diff -r a8d818fa0ec9 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c Wed Mar 18 15:50:31 2009 +0000
+++ b/xen/arch/x86/setup.c Wed Mar 18 15:56:13 2009 +0000
@@ -20,6 +20,7 @@
#include <xen/rcupdate.h>
#include <xen/vga.h>
#include <xen/dmi.h>
+#include <xen/event.h>
#include <public/version.h>
#ifdef CONFIG_COMPAT
#include <compat/platform.h>
@@ -997,6 +998,8 @@
dom0->is_privileged = 1;
dom0->target = NULL;
+ set_global_virq_handler(dom0, VIRQ_DOM_EXC);
+
/* Grab the DOM0 command line. */
cmdline = (char *)(mod[0].string ? __va(mod[0].string) : NULL);
if ( (cmdline != NULL) || (kextra != NULL) )
diff -r a8d818fa0ec9 xen/common/domctl.c
--- a/xen/common/domctl.c Wed Mar 18 15:50:31 2009 +0000
+++ b/xen/common/domctl.c Wed Mar 18 15:56:13 2009 +0000
@@ -193,11 +193,13 @@
long ret = 0;
struct xen_domctl curop, *op = &curop;
- if ( !IS_PRIV(current->domain) )
- return -EPERM;
-
if ( copy_from_guest(op, u_domctl, 1) )
return -EFAULT;
+
+ if ( !IS_PRIV(current->domain) &&
+ !(op->cmd == XEN_DOMCTL_getdomaininfo &&
+ is_global_virq_handler(current->domain, VIRQ_DOM_EXC)) )
+ return -EPERM;
if ( op->interface_version != XEN_DOMCTL_INTERFACE_VERSION )
return -EACCES;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-23 15:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-23 15:21 [PATCH 17/24] [xen-unstable.hg] specifically whitelist VIRQ_DOM_EXC as a virq that may be redirected to a domU via new hypercall Alex Zeffertt
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.