From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753235AbcGLJDT (ORCPT ); Tue, 12 Jul 2016 05:03:19 -0400 Received: from m199-177.yeah.net ([123.58.177.199]:54328 "EHLO m199-177.yeah.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752706AbcGLJDR (ORCPT ); Tue, 12 Jul 2016 05:03:17 -0400 Subject: Re: [PATCH 00/20] iommu/amd: Use generic IOVA allocator To: Joerg Roedel , iommu@lists.linux-foundation.org References: <1467978311-28322-1-git-send-email-joro@8bytes.org> Cc: Vincent.Wan@amd.com, linux-kernel@vger.kernel.org From: Wan Zongshun Message-ID: <5784B24C.60305@iommu.org> Date: Tue, 12 Jul 2016 17:03:08 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1467978311-28322-1-git-send-email-joro@8bytes.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1koWUFPN1dZCBgUCR5ZQVZIVU1NSUJCQkNNQ0hCSUJPT0hXWQkOFx4IWU FZKCs9JDU0NT4kMjUkMz46Pz4pQUtVS0A2IyQiPigkMjUkMz46Pz4pQUtVS0ArLykkNTQkMjUkMz 46Pz4pQUtVS0A4NC41LykiJDg1QUtVS0ApPjwyNDUkOigyOkFLVUtAKyk0LTI1OD4kKDM6NTwzOj JBS1VLQD8iNTo2MjgkMiskNTQkMjUkMz46Pz4pQUtVS0A2LjcvMiQpOCsvJD8yPT0#KT41LyQyNS QzPjo*PilBSVVLQDIrJC80PzoiJDg1LyRLJEpLS0FLVUtAMiskSiQ2MjUuLz4kODUvJEskSktBS1 VLQDIrJEhLJDYyNS4vPiQ4NS8kSyROS0FLVUtAMiskTiQ2MjUuLz4kODUvJEskSktBS1VLQDIrJE okMzQuKSQ4NS8kSyRKS0tBS1VLQCguOTE#OC8kLzQ*OiIkODUvJEskSktLQUtVS0AoLjkxPjgvJE okMzQuKSQ4NS8kSyRKS0tBS1VLQCguOTE#OC8kTiQ2MjUuLz4kODUvJEskSktBS1VLQCg5MSQ3Pj UkT0skI0FLVUtLSktALz4jLyQ3PjUkSklDSyQjQUtVS0tKS0A4NS8kMy82NyQ3PjUkSjAkTjBBS1 VLS0pLQCk#OD4yLT4pJDg1LyRKJE5BS1VLS0pLQCM2OjI3PikkNS43N0FLVUtLSktAPz43Mi0#KS Q3PjUkS0FLVUtLSktANzo1PCQ#NUFLVUtLSktAPSskKT4kPSwkMzcxJEtDS0hLTUFWTFVOQD01JC guOSQ#NSw0KT8oJDM3MSRKS0tJS0pBS1VJQ0AoLjkkPkFKVU5OWQY+ X-HM-Sender-Digest: e1kSHx4VD1lBWUc6OjI6Lio5IToaDDI2PEMuGhU6FVYaC0NVSlVKT01D SEpPSkNCT05IVTMWGhIXVQ0MOxIUFhYOVRQJHEVZV1kMHhlZQR0aFwgeV1kIAVlBSExPTTdXWRIL WUFZSUpLVUpIVUJMVUpNQ1kG X-HM-Tid: 0a55de587e16642727e9811060a1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2016年07月08日 19:44, Joerg Roedel wrote: > Hi, > > here is a patch-set to make the AMD IOMMU driver use the > generic IOVA allocator, which is already used in the Intel > VT-d driver and a few other places. > > The main reason for the conversion is to make the driver > benefit from the recent scalability improvements to the IOVA > code. Some of these improvements happened in the Intel VT-d > driver, these are not re-used but, for now, re-implemented. > > This leaves more room for merging things together into > common code for the future. > > The allocator that was previously used will be removed with > these patches. > > Please review. Joerg, Currently, those patches can not work at my eCarrizo board. When I merged your patches, boot failed, and no any info print to me. I set iommu=pt, it also does not work; set iommu=soft, boot ok. When I removed those patches, kernel boot ok. This eCarrizo board uart doesnot work, so I can not get useful information from kernel by uart console, I also set 'text' in boot option, but still cannot print any log. Vincent. > > Thanks, > > Joerg > > Joerg Roedel (20): > iommu: Add apply_dm_region call-back to iommu-ops > iommu/amd: Select IOMMU_IOVA for AMD IOMMU > iommu/amd: Allocate iova_domain for dma_ops_domain > iommu/amd: Create a list of reserved iova addresses > iommu/amd: Implement apply_dm_region call-back > iommu/amd: Pass gfp-flags to iommu_map_page() > iommu/amd: Remove special mapping code for dma_ops path > iommu/amd: Make use of the generic IOVA allocator > iommu/amd: Remove other remains of old address allocator > iommu/amd: Remove align-parameter from __map_single() > iommu/amd: Set up data structures for flush queue > iommu/amd: Allow NULL pointer parameter for domain_flush_complete() > iommu/amd: Implement flush queue > iommu/amd: Implement timeout to flush unmap queues > iommu/amd: Introduce dir2prot() helper > iommu/amd: Optimize map_sg and unmap_sg > iommu/amd: Use dev_data->domain in get_domain() > iommu/amd: Handle IOMMU_DOMAIN_DMA in ops->domain_free call-back > iommu/amd: Flush iova queue before releasing dma_ops_domain > iommu/amd: Use container_of to get dma_ops_domain > > drivers/iommu/Kconfig | 1 + > drivers/iommu/amd_iommu.c | 976 ++++++++++++++++------------------------ > drivers/iommu/amd_iommu_types.h | 1 - > drivers/iommu/iommu.c | 3 + > include/linux/iommu.h | 3 + > 5 files changed, 387 insertions(+), 597 deletions(-) >