From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753055AbdKIB0v (ORCPT ); Wed, 8 Nov 2017 20:26:51 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:59629 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752908AbdKIB0u (ORCPT ); Wed, 8 Nov 2017 20:26:50 -0500 Subject: Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08 To: Christoph Hellwig , Jason Gunthorpe References: <1506763741-81429-1-git-send-email-xavier.huwei@huawei.com> <1506763741-81429-3-git-send-email-xavier.huwei@huawei.com> <20170930161023.GI2965@mtr-leonro.local> <59DF60A3.7080803@huawei.com> <5fe5f9b9-2c2b-ab3c-dafa-3e2add051bbb@arm.com> <59F97BBE.5070207@huawei.com> <5A011E49.6060407@huawei.com> <20171107154838.GC21466@ziepe.ca> <20171107155805.GA24082@infradead.org> CC: Robin Murphy , Leon Romanovsky , , , , , , , , , , , , , , From: "Wei Hu (Xavier)" Message-ID: <5A03AEC3.10109@huawei.com> Date: Thu, 9 Nov 2017 09:26:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20171107155805.GA24082@infradead.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.57.115.182] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/11/7 23:58, Christoph Hellwig wrote: > On Tue, Nov 07, 2017 at 08:48:38AM -0700, Jason Gunthorpe wrote: >> Can't you just use vmalloc and dma_map that? Other drivers follow that >> approach.. > You can't easily due to the flushing requirements. We used to do that > in XFS and it led to problems. You need the page allocator + vmap + > invalidate_kernel_vmap_range + flush_kernel_vmap_range to get the > cache flushing right. > > . Hi, Christoph Hellwig Thanks for your suggestion. Regards Wei Hu