Hello,

The SMMU drivers has diverged from Linux. Having our own driver doesn't make
any benefits and make difficult to backport fixes and/or porting features such
as PCI.

With this series, the code of the SMMU drivers (copied from Linux) is mostly
not modified. If it's the case a comment /* Xen: ... */ has been added to
explain why. It's based on Linux 3.19. Even if they have plan to move out
most of the page table code in a separate library for 3.20, I think we should
stay on the 3.19 version. Indeed Linux drivers can move fast.

To make the change obvious the resync of the SMMU code is made in several step
    1) Revert the current SMMU driver (patch #5)
    2) Import as it is the driver from Linux (patch #9)
    3) Apply 2 fixes which are useful to correctly use the SATA with SMMU on
    calxeda. I don't know why Linux didn't yet applied (patch #10-11)
    4) Chanes for Xen (patch #12)

I also took the opportunity of the resync to consolidate the iommu ops in a
single set. When I added the IOMMU set to handle platform device passthrough (
ops assing_dt_device and reassign_dt_device), I didn't think about merging the
ops with the PCI one. In fact Linux is using a single set and have only few
lines per driver specific to each set (PCI or platform device).

A branch is available with all the changes:
    git::/xenbits.xen.org/people/julieng/xen-unstable.git branch smmu-rework-v2

Major changes in v3:
    - Add back coherent walk support (see patch #13)

Major changes in v2:
    - Introduce the generic struct to describe device on ARM. Alias it
    to pci_dev on x86
    - Defer the introduction of PCI in the generic device later

For all changes see each patches.

I have summarize below the patch acked/modified:

    A: Patch acked
    N: New patch
    M: Patch modified in this version

Regards,

Andreas Herrmann (2):
     xen/iommu: smmu: Check for duplicate stream IDs when registering
       master devices
     xen/iommu: smmu: Introduce automatic stream-id-masking

Julien Grall (11):
 A   xen/arm: gic-v2: Change the device name in DT_DEVICE_START
 A   xen/arm: vgic: Drop unecessary include asm/device.h
   M xen/dt: Extend dt_device_match to possibly store data
   M xen/arm: device: Rename device_type into device_class
 A   xen/iommu: arm: Remove temporary the SMMU driver
   M xen/arm: Introduce a generic way to describe device
 A   xen/iommu: Consolidate device assignment ops into a single set
 A   xen/arm: Describe device supported by a driver with dt_match_node
   M xen/iommu: arm: Import the SMMU driver from Linux
     xen/iommu: smmu: Add Xen specific code to be able to use the driver
   N xen/iommu: smmu: Advertise when the SMMU support coherent table walk

 xen/arch/arm/device.c                 |   29 +-
 xen/arch/arm/domain_build.c           |    2 +-
 xen/arch/arm/gic-v2.c                 |   12 +-
 xen/arch/arm/gic-v3.c                 |    8 +-
 xen/arch/arm/platform.c               |    2 +-
 xen/arch/arm/vgic-v2.c                |    1 -
 xen/arch/arm/vgic-v3.c                |    1 -
 xen/common/device_tree.c              |   15 +-
 xen/drivers/char/exynos4210-uart.c    |    8 +-
 xen/drivers/char/ns16550.c            |   12 +-
 xen/drivers/char/omap-uart.c          |    8 +-
 xen/drivers/char/pl011.c              |    8 +-
 xen/drivers/passthrough/arm/smmu.c    | 4146 +++++++++++++++++++++------------
 xen/drivers/passthrough/device_tree.c |    5 +-
 xen/drivers/passthrough/pci.c         |   20 +-
 xen/include/asm-arm/device.h          |   46 +-
 xen/include/asm-arm/gic.h             |   15 +-
 xen/include/asm-x86/device.h          |   25 +
 xen/include/xen/device_tree.h         |   19 +-
 xen/include/xen/iommu.h               |   18 +-
 xen/include/xen/pci.h                 |    1 +
 21 files changed, 2795 insertions(+), 1606 deletions(-)
 create mode 100644 xen/include/asm-x86/device.h

-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to