[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V2 2/6] iommu/arm: Add ability to handle deferred probing request




Hi, Julien



I noticed there was already a panic() in iommu_setup() just in case the user force the use of IOMMU but they were not initialized. I was half-tempted to set
iommu_force to true for Arm, but I think this is a different issue.

So here my take (not tested nor compiled).

Thank you. I will check it and come back with results.

I have preliminary tested it with my IPMMU series including new modification of "deferred probing" patch (attached). Being honest my series is not based on the *current* staging, but not too outdated.

So, your patch works as expected in the following scenarios:

1. [No panic] Without IOMMU driver in Xen (#CONFIG_IPMMU_VMSA is not set).

2. [No panic] IOMMU driver is present, but reports it is cannot be used in Xen (P2M sharing not supported, etc) by returning -ENODEV.

3. [No panic] IOMMU is globally disabled in command line "iommu=0".

4. [No panic] IOMMU driver requests deferred probing until the last device in DT is initialized, after that all deferred devices get initialized.

5. [Panic] IOMMU driver returns an error (other than -EBADF and -ENODEV) at the very beginning/when a part of devices are already initialized.

6. [Panic] IOMMU driver always returns deferred probing/returns an error other than -EAGAIN after deferred probing.



diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 2c5d1372c0..8f94f618b0 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -755,6 +755,7 @@ void __init start_xen(unsigned long boot_phys_offset,
          .max_grant_frames = gnttab_dom0_frames(),
          .max_maptrack_frames = opt_max_maptrack_frames,
      };
+    int rc;
        dcache_line_bytes = read_dcache_line_bytes();
  @@ -890,7 +891,9 @@ void __init start_xen(unsigned long boot_phys_offset,
        setup_virt_paging();
  -    iommu_setup();
+    rc = iommu_setup();
+    if ( !iommu_enabled && rc != -ENODEV )
+        panic("Couldn't configure correctly all the IOMMUs.");

"\n" should be added.



--
Regards,

Oleksandr Tyshchenko

Attachment: 0001-iommu-arm-Add-ability-to-handle-deferred-probing-req.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.