[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131107185806.GN13139@mudshark.cambridge.arm.com>
Date: Thu, 7 Nov 2013 18:58:06 +0000
From: Will Deacon <will.deacon@....com>
To: Antonios Motakis <a.motakis@...tualopensystems.com>
Cc: Joerg Roedel <joro@...tes.org>,
"moderated list:ARM SMMU DRIVER"
<linux-arm-kernel@...ts.infradead.org>,
"open list:IOMMU DRIVERS" <iommu@...ts.linux-foundation.org>,
open list <linux-kernel@...r.kernel.org>,
"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
"tech@...tualopensystems.com" <tech@...tualopensystems.com>,
"agraf@...e.de" <agraf@...e.de>,
"B08248@...escale.com" <B08248@...escale.com>
Subject: Re: [PATCH 2/2] ARM: SMMU: return NULL on error in
arm_smmu_iova_to_phys
On Mon, Oct 14, 2013 at 06:09:48PM +0100, Will Deacon wrote:
> On Mon, Oct 14, 2013 at 04:17:51PM +0100, Antonios Motakis wrote:
> > On Mon, Oct 14, 2013 at 2:48 PM, Will Deacon <will.deacon@....com> wrote:
> > > On Fri, Oct 11, 2013 at 02:24:47PM +0100, Antonios Motakis wrote:
> > VFIO will exercise this code path every time when mapping DMA memory.
> > This is normal and VFIO *expects* the function to fail - it is only if
> > the function succeeds that VFIO needs to back down from the DMA
> > mapping and fail.
> >
> > This means that there would be a warning every time a VFIO user maps
> > some memory for DMA use, even though nothing went wrong.
>
> Ok, in which case it might be worth reworking arm_smmu_iova_to_phys to treat
> {pgd,pud,pmd,pte}_none different from {pgd,pud,pmd,pte}_bad.
Just an FYI, but I realised the page table locking is broken in my driver
(hold a spinlock over a non-atomic allocation; looks like the exynos guys do
this too), so I've just reworked a bunch of iova_to_phys and incorporated this
change as part of that.
Cheers,
Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists