diff options
author | Julien Grall <julien.grall@linaro.org> | 2013-09-13 13:49:26 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-09-17 15:28:55 +0100 |
commit | 7cb187fa95931f3b704cd9f5820924eec1c7870c (patch) | |
tree | efc790d5641cf956648bc9cfa0821b15b21353a5 /xen/arch | |
parent | 5b73b82d2fddc450c73a268e1e70f5b25b6232c0 (diff) | |
download | xen-7cb187fa95931f3b704cd9f5820924eec1c7870c.tar.gz xen-7cb187fa95931f3b704cd9f5820924eec1c7870c.tar.bz2 xen-7cb187fa95931f3b704cd9f5820924eec1c7870c.zip |
xen/arm: Add new platform specific callback device_is_blacklist
Each platform code will list the device that must not pass-through to a guest.
Theses devices are used for: power management, timer,...
When theses devices are given to DOM0, it can controls the hardware and then
break the whole platform.
This callback is enough until we will start to care about power performance.
For this purpose, we may need to extend this interface to implement per-device
MMIO filtering to allow dom0 to continue to control devices which it owns which
happen to share e.g. a clock controller with Xen.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/arch')
-rw-r--r-- | xen/arch/arm/domain_build.c | 3 | ||||
-rw-r--r-- | xen/arch/arm/platform.c | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index cda1e13d7a..300a64da49 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -676,7 +676,8 @@ static int handle_node(struct domain *d, struct kernel_info *kinfo, DPRINT("handle %s\n", path); /* Skip theses nodes and the sub-nodes */ - if ( dt_match_node(skip_matches, np ) ) + if ( dt_match_node(skip_matches, np ) || + platform_device_is_blacklisted(np) ) { DPRINT(" Skip it!\n"); return 0; diff --git a/xen/arch/arm/platform.c b/xen/arch/arm/platform.c index afda302159..db79368ce2 100644 --- a/xen/arch/arm/platform.c +++ b/xen/arch/arm/platform.c @@ -127,6 +127,16 @@ bool_t platform_has_quirk(uint32_t quirk) return !!(quirks & quirk); } +bool_t platform_device_is_blacklisted(const struct dt_device_node *node) +{ + const struct dt_device_match *blacklist = NULL; + + if ( platform && platform->blacklist_dev ) + blacklist = platform->blacklist_dev; + + return dt_match_node(blacklist, node); +} + /* * Local variables: * mode: C |