Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1653305

Re: Device address specific mapping of arm,mmu-500

From Will Deacon <will.deacon@arm.com>
Newsgroups linux.kernel
Subject Re: Device address specific mapping of arm,mmu-500
Date 2017-05-30 17:20 +0200
Message-ID <tMR69-A4-5@gated-at.bofh.it> (permalink)
References <tMDZg-8rt-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, May 29, 2017 at 06:18:45PM -0700, Ray Jui wrote:
> I'm writing to check with you to see if the latest arm-smmu.c driver in
> v4.12-rc Linux for smmu-500 can support mapping that is only specific to
> a particular physical address range while leave the rest still to be
> handled by the client device. I believe this can already be supported by
> the device tree binding of the generic IOMMU framework; however, it is
> not clear to me whether or not the arm-smmu.c driver can support it.
> 
> To give you some background information:
> 
> We have a SoC that has PCIe root complex that has a build-in logic block
> to forward MSI writes to ARM GICv3 ITS. Unfortunately, this logic block
> has a HW bug that causes the MSI writes not parsed properly and can
> potentially corrupt data in the internal FIFO. A workaround is to have
> ARM MMU-500 takes care of all inbound transactions. I found that is
> working after hooking up our PCIe root complex to MMU-500; however, even
> with this optimized arm-smmu driver in v4.12, I'm still seeing a
> significant Ethernet throughput drop in both the TX and RX directions.
> The throughput drop is very significant at around 50% (but is already
> much improved compared to other prior kernel versions at 70~90%).

Did Robin's experiments help at all with this?

http://www.linux-arm.org/git?p=linux-rm.git;a=shortlog;h=refs/heads/iommu/perf

> One alternative is to only use MMU-500 for MSI writes towards
> GITS_TRANSLATER register in the GICv3, i.e., if I can define a specific
> region of physical address that I want MMU-500 to act on and leave the
> rest of inbound transactions to be handled directly by our PCIe
> controller, it can potentially work around the HW bug we have and at the
> same time achieve optimal throughput.

I don't think you can bypass the SMMU for MSIs unless you give them their
own StreamIDs, which is likely to break things horribly in the kernel. You
could try to create an identity mapping, but you'll still have the
translation overhead and you'd probably end up having to supply your own DMA
ops to manage the address space. I'm assuming that you need to prevent the
physical address of the ITS from being allocated as an IOVA?

> Any feedback from you is greatly appreciated!

Fix the hardware ;)

Will

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Device address specific mapping of arm,mmu-500 Ray Jui <ray.jui@broadcom.com> - 2017-05-30 03:20 +0200
  Re: Device address specific mapping of arm,mmu-500 Will Deacon <will.deacon@arm.com> - 2017-05-30 17:20 +0200
    Re: Device address specific mapping of arm,mmu-500 Ray Jui <ray.jui@broadcom.com> - 2017-05-30 18:50 +0200
      Re: Device address specific mapping of arm,mmu-500 Marc Zyngier <marc.zyngier@arm.com> - 2017-05-30 19:10 +0200
        Re: Device address specific mapping of arm,mmu-500 Ray Jui <ray.jui@broadcom.com> - 2017-05-30 19:20 +0200
          Re: Device address specific mapping of arm,mmu-500 Marc Zyngier <marc.zyngier@arm.com> - 2017-05-30 19:30 +0200
            Re: Device address specific mapping of arm,mmu-500 Ray Jui <ray.jui@broadcom.com> - 2017-05-31 00:10 +0200
              Re: Device address specific mapping of arm,mmu-500 Ray Jui <ray.jui@broadcom.com> - 2017-05-31 08:20 +0200
                Re: Device address specific mapping of arm,mmu-500 Will Deacon <will.deacon@arm.com> - 2017-05-31 14:50 +0200
                Re: Device address specific mapping of arm,mmu-500 Ray Jui <ray.jui@broadcom.com> - 2017-05-31 19:40 +0200
                Re: Device address specific mapping of arm,mmu-500 Ray Jui <ray.jui@broadcom.com> - 2017-06-05 20:10 +0200
                Re: Device address specific mapping of arm,mmu-500 Robin Murphy <robin.murphy@arm.com> - 2017-06-06 12:10 +0200
                Re: Device address specific mapping of arm,mmu-500 Ray Jui <ray.jui@broadcom.com> - 2017-06-07 08:30 +0200
      Re: Device address specific mapping of arm,mmu-500 Robin Murphy <robin.murphy@arm.com> - 2017-05-30 19:30 +0200

csiph-web