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


Groups > linux.kernel > #1519845

Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions callback

From Joerg Roedel <joro@8bytes.org>
Newsgroups linux.kernel
Subject Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions callback
Date 2016-11-11 16:10 +0100
Message-ID <sClCO-5Wb-9@gated-at.bofh.it> (permalink)
References (1 earlier) <szKR3-112-23@gated-at.bofh.it> <sBZLY-871-27@gated-at.bofh.it> <sC05k-8tv-17@gated-at.bofh.it> <sC0f0-77-9@gated-at.bofh.it> <sCl9M-5wV-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Nov 11, 2016 at 02:34:39PM +0000, Robin Murphy wrote:
> On 10/11/16 16:16, Joerg Roedel wrote:
> > On Thu, Nov 10, 2016 at 04:07:08PM +0000, Robin Murphy wrote:
> >> On 10/11/16 15:46, Joerg Roedel wrote:
> >>> On Fri, Nov 04, 2016 at 11:24:06AM +0000, Eric Auger wrote:
> >>>> +	resource_list_for_each_entry(window, &bridge->windows) {
> >>>> +		if (resource_type(window->res) != IORESOURCE_MEM &&
> >>>> +		    resource_type(window->res) != IORESOURCE_IO)
> >>>> +			continue;
> >>>
> >>> Why do you care about IO resources?
> >>
> >> [since this is essentially code I wrote]
> >>
> >> Because they occupy some area of the PCI address space, therefore I
> >> assumed that, like memory windows, they would be treated as P2P. Is that
> >> not the case?
> > 
> > No, not at all. The IO-space is completly seperate from the MEM-space.
> > They are two different address-spaces, addressing different things. And
> > the IO-space is also not translated by any IOMMU I am aware of.
> 
> OK. On the particular root complex I have to hand, though, any DMA to
> IOVAs between 0x5f800000 and 0x5fffffff sends an error back to the
> endpoint, and that just so happens to be where the I/O window is placed
> (both on the PCI side and the AXI (i.e. CPU MMIO) side. Whether it's
> that the external MMIO view of the RC's I/O window is explicitly
> duplicated in its PCI memory space as some side-effect of the PCI/AXI
> bridge, or that the thing just doesn't actually respect the access type
> on the PCI side I don't know, but that's how it is (and I spent this
> morning recreating it to make sure I wasn't mistaken).

What you see is that on your platform the io-ports are accessed by an
mmio-window. On x86 you have dedicated instructions to access io-ports.
And the io-port ranges are what is what the io-resources describe. These
resources do no tell you where the mmio-region for that devices io-ports
are.


	Joerg

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


Thread

[RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions callback Eric Auger <eric.auger@redhat.com> - 2016-11-04 12:30 +0100
  Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Robin Murphy <robin.murphy@arm.com> - 2016-11-04 15:20 +0100
  Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Joerg Roedel <joro@8bytes.org> - 2016-11-10 16:50 +0100
    Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Auger Eric <eric.auger@redhat.com> - 2016-11-10 17:00 +0100
      Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Joerg Roedel <joro@8bytes.org> - 2016-11-10 17:20 +0100
        Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Auger Eric <eric.auger@redhat.com> - 2016-11-10 19:10 +0100
          Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Joerg Roedel <joro@8bytes.org> - 2016-11-11 12:50 +0100
            Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Auger Eric <eric.auger@redhat.com> - 2016-11-11 16:50 +0100
              Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Joerg Roedel <joro@8bytes.org> - 2016-11-11 17:30 +0100
                Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Auger Eric <eric.auger@redhat.com> - 2016-11-11 17:50 +0100
                Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Joerg Roedel <joro@8bytes.org> - 2016-11-14 16:40 +0100
                Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Auger Eric <eric.auger@redhat.com> - 2016-11-14 17:10 +0100
                Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Joerg Roedel <joro@8bytes.org> - 2016-11-14 17:30 +0100
                Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Auger Eric <eric.auger@redhat.com> - 2016-11-14 18:00 +0100
    Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Robin Murphy <robin.murphy@arm.com> - 2016-11-10 17:10 +0100
      Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Joerg Roedel <joro@8bytes.org> - 2016-11-10 17:20 +0100
        Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Robin Murphy <robin.murphy@arm.com> - 2016-11-11 15:40 +0100
          Re: [RFC v2 8/8] iommu/arm-smmu: implement add_reserved_regions  callback Joerg Roedel <joro@8bytes.org> - 2016-11-11 16:10 +0100

csiph-web