aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xsm
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-02-02 15:18:19 +0000
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-02-02 15:18:19 +0000
commitf2aba4f387b67238cd3293167ee3ee6b674d5b4f (patch)
tree3df81d4ee5cdb96a508abc490f591ed61f3f53b9 /xen/include/xsm
parent99b70ee44e330cac545b13eae7085baffeb74ac0 (diff)
downloadxen-f2aba4f387b67238cd3293167ee3ee6b674d5b4f.tar.gz
xen-f2aba4f387b67238cd3293167ee3ee6b674d5b4f.tar.bz2
xen-f2aba4f387b67238cd3293167ee3ee6b674d5b4f.zip
xsm: Add xsm_map_domain_pirq hook
When checking permissions in map_domain_pirq, the msi_desc field of the irq_desc is not yet populated with the PCI device being used. Pass in the msi_info structure which contains the intended PCI device whose label will be used in the security check. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xsm')
-rw-r--r--xen/include/xsm/xsm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index 6e3a8f051a..e896f731a4 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -115,6 +115,7 @@ struct xsm_operations {
int (*schedop_shutdown) (struct domain *d1, struct domain *d2);
char *(*show_irq_sid) (int irq);
+ int (*map_domain_pirq) (struct domain *d, int irq, void *data);
int (*irq_permission) (struct domain *d, int pirq, uint8_t allow);
int (*iomem_permission) (struct domain *d, uint64_t s, uint64_t e, uint8_t allow);
int (*pci_config_permission) (struct domain *d, uint32_t machine_bdf, uint16_t start, uint16_t end, uint8_t access);
@@ -484,6 +485,11 @@ static inline char *xsm_show_irq_sid (int irq)
return xsm_call(show_irq_sid(irq));
}
+static inline int xsm_map_domain_pirq (struct domain *d, int irq, void *data)
+{
+ return xsm_call(map_domain_pirq(d, irq, data));
+}
+
static inline int xsm_irq_permission (struct domain *d, int pirq, uint8_t allow)
{
return xsm_call(irq_permission(d, pirq, allow));