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

Re: [PATCH v6 10/10] xen/arm: smmuv3: Add support for SMMUv3 driver



On Fri, 22 Jan 2021, Oleksandr wrote:
> On 22.01.21 13:37, Rahul Singh wrote:
> 
> Hi Rahul
> 
> > Add support for ARM architected SMMUv3 implementation. It is based on
> > the Linux SMMUv3 driver.
> > 
> > Driver is currently supported as Tech Preview.
> > 
> > Major differences with regard to Linux driver are as follows:
> > 2. Only Stage-2 translation is supported as compared to the Linux driver
> >     that supports both Stage-1 and Stage-2 translations.
> > 3. Use P2M  page table instead of creating one as SMMUv3 has the
> >     capability to share the page tables with the CPU.
> > 4. Tasklets are used in place of threaded IRQ's in Linux for event queue
> >     and priority queue IRQ handling.
> > 5. Latest version of the Linux SMMUv3 code implements the commands queue
> >     access functions based on atomic operations implemented in Linux.
> >     Atomic functions used by the commands queue access functions are not
> >     implemented in XEN therefore we decided to port the earlier version
> >     of the code. Atomic operations are introduced to fix the bottleneck
> >     of the SMMU command queue insertion operation. A new algorithm for
> >     inserting commands into the queue is introduced, which is lock-free
> >     on the fast-path.
> >     Consequence of reverting the patch is that the command queue
> >     insertion will be slow for large systems as spinlock will be used to
> >     serializes accesses from all CPUs to the single queue supported by
> >     the hardware. Once the proper atomic operations will be available in
> >     XEN the driver can be updated.
> > 6. Spin lock is used in place of mutex when attaching a device to the
> >     SMMU, as there is no blocking locks implementation available in XEN.
> >     This might introduce latency in XEN. Need to investigate before
> >     driver is out for tech preview.
> > 7. PCI ATS functionality is not supported, as there is no support
> >     available in XEN to test the functionality. Code is not tested and
> >     compiled. Code is guarded by the flag CONFIG_PCI_ATS.
> > 8. MSI interrupts are not supported as there is no support available in
> >     XEN to request MSI interrupts. Code is not tested and compiled. Code
> >     is guarded by the flag CONFIG_MSI.
> > 
> > Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
> > Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
> > ---
> > Changes since v2:
> > - added return statement for readx_poll_timeout function.
> > - remove iommu_get_dma_cookie and iommu_put_dma_cookie.
> > - remove struct arm_smmu_xen_device as not required.
> > - move dt_property_match_string to device_tree.c file.
> > - replace arm_smmu_*_thread to arm_smmu_*_tasklet to avoid confusion.
> > - use ARM_SMMU_REG_SZ as size when map memory to XEN.
> > - remove bypass keyword to make sure when device-tree probe is failed we
> >    are reporting error and not continuing to configure SMMU in bypass
> >    mode.
> > - fixed minor comments.
> > Changes since v3:
> > - Fixed typo for CONFIG_MSI
> > - Added back the mutex code
> > - Rebase the patch on top of newly added WARN_ON().
> > - Remove the direct read of register VTCR_EL2.
> > - Fixed minor comments.
> > Changes since v4:
> > - Replace the ffsll() with ffs64() function.
> > - Add code to free resources when probe failed.
> > Changes since v5:
> > - Add code for arm_smmu_iommu_hwdom_init().
> > - fixed minor comments.
> 
> You can add my (if this is really needed):
> Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>

Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>



 


Rackspace

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