diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-01-10 17:32:10 +0000 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-01-10 17:32:10 +0000 |
commit | 11e65dc903a6b93919c9a69278499ac85332207c (patch) | |
tree | 781e8ca61cab16fef9637af42847f14b0dd35ed2 /xen/arch/x86/domctl.c | |
parent | d05b3ddfdc8bb4c51c9764a6afaf7a3cce4a15fd (diff) | |
download | xen-11e65dc903a6b93919c9a69278499ac85332207c.tar.gz xen-11e65dc903a6b93919c9a69278499ac85332207c.tar.bz2 xen-11e65dc903a6b93919c9a69278499ac85332207c.zip |
arch/x86: add distinct XSM hooks for map/unmap
The xsm_iomem_permission and xsm_ioport_permission hooks are intended
to be called by the domain builder, while the calls in
arch/x86/domctl.c which control mapping are also performed by the
device model. Because these operations require distinct access
control policies, they cannot use the same XSM hooks.
This also adds a missing XSM hook in the unbind IRQ domctl.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/domctl.c')
-rw-r--r-- | xen/arch/x86/domctl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index e89a20a3aa..0e81010a40 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -656,6 +656,10 @@ long arch_do_domctl( !irq_access_permitted(current->domain, bind->machine_irq) ) break; + ret = xsm_unbind_pt_irq(d, bind); + if ( ret ) + break; + if ( iommu_enabled ) { spin_lock(&pcidevs_lock); @@ -687,7 +691,7 @@ long arch_do_domctl( !iomem_access_permitted(current->domain, mfn, mfn + nr_mfns - 1) ) break; - ret = xsm_iomem_permission(d, mfn, mfn + nr_mfns - 1, add); + ret = xsm_iomem_mapping(d, mfn, mfn + nr_mfns - 1, add); if ( ret ) break; @@ -765,7 +769,7 @@ long arch_do_domctl( !ioports_access_permitted(current->domain, fmp, fmp + np - 1) ) break; - ret = xsm_ioport_permission(d, fmp, fmp + np - 1, add); + ret = xsm_ioport_mapping(d, fmp, fmp + np - 1, add); if ( ret ) break; |