diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2011-12-02 13:47:08 -0800 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2011-12-02 13:47:08 -0800 |
commit | 3d7895b3bbe977e3abd2d4128e42c1daba5e3fa4 (patch) | |
tree | 3a17a23357b787f377dc3dc669824cc88e352306 /xen/arch/x86/irq.c | |
parent | 65d744c6d56f92401b9d279c9cf8fe618397be0e (diff) | |
download | xen-3d7895b3bbe977e3abd2d4128e42c1daba5e3fa4.tar.gz xen-3d7895b3bbe977e3abd2d4128e42c1daba5e3fa4.tar.bz2 xen-3d7895b3bbe977e3abd2d4128e42c1daba5e3fa4.zip |
xsm: Expand I/O resource hooks
The XSM hooks inside rangeset are not useful in capturing the PIRQ
mappings in HVM domains. They can also be called from softirq context
where current->domain is invalid, causing spurious AVC denials from
unrelated domains on such calls.
Within FLASK code, the rangeset hooks were already divided between
IRQs, I/O memory, and x86 IO ports; propagate this division back
through the XSM hooks and call the XSM functions directly when needed.
This removes XSM checks for the initial rangeset population for dom0
and the removal checks on domain destruction; denying either of these
actions does not make sense.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/irq.c')
-rw-r--r-- | xen/arch/x86/irq.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 9149096507..b1c5d421f3 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -18,6 +18,7 @@ #include <xen/iocap.h> #include <xen/iommu.h> #include <xen/trace.h> +#include <xsm/xsm.h> #include <asm/msi.h> #include <asm/current.h> #include <asm/flushtlb.h> @@ -1817,6 +1818,14 @@ int map_domain_pirq( return 0; } + ret = xsm_irq_permission(d, irq, 1); + if ( ret ) + { + dprintk(XENLOG_G_ERR, "dom%d: could not permit access to irq %d mapping to pirq %d\n", + d->domain_id, irq, pirq); + return ret; + } + ret = irq_permit_access(d, pirq); if ( ret ) { |