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;
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
#include <xen/init.h>
#include <xen/sched.h>
#include <xen/mm.h>
+#include <xen/device_tree.h>
/* Describe specific operation for a board */
struct platform_desc {
* board with different quirk on each
*/
uint32_t (*quirks)(void);
+ /*
+ * Platform blacklist devices
+ * List of devices which must not pass-through to a guest
+ */
+ const struct dt_device_match *blacklist_dev;
};
/*
void platform_reset(void);
void platform_poweroff(void);
bool_t platform_has_quirk(uint32_t quirk);
+bool_t platform_device_is_blacklisted(const struct dt_device_node *node);
#define PLATFORM_START(_name, _namestr) \
static const struct platform_desc __plat_desc_##_name __used \