[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 08/13] iommu/arm: Misc fixes for arch specific part
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx> 1. Add missing return in case if IOMMU ops have been already set. 2. Add check for shared IOMMU before returning an error. Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx> CC: Julien Grall <julien.grall@xxxxxxx> --- Changes in V1: - Changes in V2: - --- xen/drivers/passthrough/arm/iommu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/drivers/passthrough/arm/iommu.c b/xen/drivers/passthrough/arm/iommu.c index 95b1abb..6f01c13 100644 --- a/xen/drivers/passthrough/arm/iommu.c +++ b/xen/drivers/passthrough/arm/iommu.c @@ -32,7 +32,10 @@ void __init iommu_set_ops(const struct iommu_ops *ops) BUG_ON(ops == NULL); if ( iommu_ops && iommu_ops != ops ) + { printk("WARNING: Cannot set IOMMU ops, already set to a different value\n"); + return; + } iommu_ops = ops; } @@ -70,6 +73,6 @@ void arch_iommu_domain_destroy(struct domain *d) int arch_iommu_populate_page_table(struct domain *d) { - /* The IOMMU shares the p2m with the CPU */ - return -ENOSYS; + /* Return an error if the IOMMU shares the p2m with the CPU */ + return iommu_use_hap_pt(d) ? -ENOSYS : 0; } -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |