diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-09-04 11:25:09 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-09-04 11:25:09 +0100 |
commit | aff2988ad524ed3835bd0c402f8ec25264db61ea (patch) | |
tree | 12ba50c678f9862e3b519adf0605c97d2c7d3df3 /xen/common/rangeset.c | |
parent | 06cfe5df7bdadd1972619d26127bd18a56a1db04 (diff) | |
download | xen-aff2988ad524ed3835bd0c402f8ec25264db61ea.tar.gz xen-aff2988ad524ed3835bd0c402f8ec25264db61ea.tar.bz2 xen-aff2988ad524ed3835bd0c402f8ec25264db61ea.zip |
xsm: refactor IO hooks/sysctl hooks
- The patch refactors the IO resource checks into the rangeset add/del
code. This produces a much more architecture friendly implementation and
ensures that HVM and paravirtualized guests are checked consistently.
- The patch removes the following hooks in support of the refactoring
of the IO resource checks:
- xsm_irq_permission
- xsm_iomem_permission
- xsm_ioport_permission
- The patch adds the following hooks in support of the refactoring of
the IO resource checks:
- xsm_add_range
- xsm_remove_range
- These IO refactoring changes are transparent to any pre-existing
Flask policies.
- The patch adds also adds hooks for sysctl functionality that was
added since the last major XSM patch. The following hooks were added:
- xsm_set_target
- xsm_debug_keys
- xsm_getcpuinfo
- xsm_availheap
- xsm_firmware_info
- xsm_acpi_sleep
- xsm_change_freq
- xsm_getidletime
- xsm_sendtrigger
- xsm_test_assign_device
- xsm_assign_device
- xsm_deassign_device
- xsm_bind_pt_irq
- xsm_pin_mem_cacheattr
- xsm_ext_vcpucontext
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
Diffstat (limited to 'xen/common/rangeset.c')
-rw-r--r-- | xen/common/rangeset.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xen/common/rangeset.c b/xen/common/rangeset.c index 5c1b73cefe..befeff23dc 100644 --- a/xen/common/rangeset.c +++ b/xen/common/rangeset.c @@ -10,6 +10,7 @@ #include <xen/sched.h> #include <xen/errno.h> #include <xen/rangeset.h> +#include <xsm/xsm.h> /* An inclusive range [s,e] and pointer to next range in ascending order. */ struct range { @@ -96,6 +97,10 @@ int rangeset_add_range( struct range *x, *y; int rc = 0; + rc = xsm_add_range(r->domain, r->name, s, e); + if ( rc ) + return rc; + ASSERT(s <= e); spin_lock(&r->lock); @@ -164,6 +169,10 @@ int rangeset_remove_range( struct range *x, *y, *t; int rc = 0; + rc = xsm_remove_range(r->domain, r->name, s, e); + if ( rc ) + return rc; + ASSERT(s <= e); spin_lock(&r->lock); |