specifically whitelist VIRQ_DOM_EXC as a virq that may be redirected to a domU via new hypercall
PATCH 17/24 specifically whitelist VIRQ_DOM_EXC as a virq that may be redirected to a domU via new hypercall
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 <[email protected]>
Signed-off-by Alex Zeffertt <[email protected]>
---
xen/arch/ia64/xen/xensetup.c +3 -0
@@ -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.
xen/arch/x86/setup.c +3 -0
@@ -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 ) )
xen/common/domctl.c +5 -3
@@ -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 ;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel