From: Michael Ellerman Date: Mon, 01 May 2017 02:58:51 +0000 Subject: Re: [kernel, v11, 01/10] powerpc/mmu: Add real mode support for IOMMU preregistered memory Message-Id: <3wGTdl2zlQz9sN9@ozlabs.org> List-Id: References: <20170322042156.11756-2-aik@ozlabs.ru> In-Reply-To: <20170322042156.11756-2-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexey Kardashevskiy , linuxppc-dev@lists.ozlabs.org Cc: kvm@vger.kernel.org, Alexey Kardashevskiy , kvm-ppc@vger.kernel.org, Alex Williamson , Paul Mackerras , David Gibson On Wed, 2017-03-22 at 04:21:47 UTC, Alexey Kardashevskiy wrote: > This makes mm_iommu_lookup() able to work in realmode by replacing > list_for_each_entry_rcu() (which can do debug stuff which can fail in > real mode) with list_for_each_entry_lockless(). > > This adds realmode version of mm_iommu_ua_to_hpa() which adds > explicit vmalloc'd-to-linear address conversion. > Unlike mm_iommu_ua_to_hpa(), mm_iommu_ua_to_hpa_rm() can fail. > > This changes mm_iommu_preregistered() to receive @mm as in real mode > @current does not always have a correct pointer. > > This adds realmode version of mm_iommu_lookup() which receives @mm > (for the same reason as for mm_iommu_preregistered()) and uses > lockless version of list_for_each_entry_rcu(). > > Signed-off-by: Alexey Kardashevskiy > Reviewed-by: David Gibson Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/6b5c19c55266f6efd10ffac0e9f9f2 cheers