On 26.04.2021 18:21, Rahul Singh wrote: > --- a/xen/xsm/flask/hooks.c > +++ b/xen/xsm/flask/hooks.c > @@ -21,7 +21,7 @@ > #include <xen/guest_access.h> > #include <xen/xenoprof.h> > #include <xen/iommu.h> > -#ifdef CONFIG_HAS_PCI > +#ifdef CONFIG_PCI_MSI_INTERCEPT > #include <asm/msi.h> > #endif > #include <public/xen.h> > @@ -114,7 +114,7 @@ static int get_irq_sid(int irq, u32 *sid, struct > avc_audit_data *ad) > } > return security_irq_sid(irq, sid); > } > -#ifdef CONFIG_HAS_PCI > +#ifdef CONFIG_PCI_MSI_INTERCEPT > { > struct irq_desc *desc = irq_to_desc(irq); > if ( desc->msi_desc && desc->msi_desc->dev ) { > @@ -874,7 +874,7 @@ static int flask_map_domain_pirq (struct domain *d) > static int flask_map_domain_msi (struct domain *d, int irq, const void *data, > u32 *sid, struct avc_audit_data *ad) > { > -#ifdef CONFIG_HAS_PCI > +#ifdef CONFIG_PCI_MSI_INTERCEPT > const struct msi_info *msi = data; > u32 machine_bdf = (msi->seg << 16) | (msi->bus << 8) | msi->devfn; > > @@ -940,7 +940,7 @@ static int flask_unmap_domain_pirq (struct domain *d) > static int flask_unmap_domain_msi (struct domain *d, int irq, const void > *data, > u32 *sid, struct avc_audit_data *ad) > { > -#ifdef CONFIG_HAS_PCI > +#ifdef CONFIG_PCI_MSI_INTERCEPT > const struct pci_dev *pdev = data; > u32 machine_bdf = (pdev->seg << 16) | (pdev->bus << 8) | pdev->devfn; >
Is all of this really related to MSI interception? Iirc the code here has been around for much longer, and hence is more related to MSI support in Xen in general (as required for PV guests in particular). Jan