From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752486AbbKPP7E (ORCPT ); Mon, 16 Nov 2015 10:59:04 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:61285 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751584AbbKPP67 (ORCPT ); Mon, 16 Nov 2015 10:58:59 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Sinan Kaya , dmaengine@vger.kernel.org, timur@codeaurora.org, cov@codeaurora.org, jcm@redhat.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, agross@codeaurora.org Subject: Re: [PATCH V5 2/3] dma: add Qualcomm Technologies HIDMA management driver Date: Mon, 16 Nov 2015 16:58:21 +0100 Message-ID: <6159200.u9U0p8aIkU@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1447620855-4974-3-git-send-email-okaya@codeaurora.org> References: <1447620855-4974-1-git-send-email-okaya@codeaurora.org> <1447620855-4974-3-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:10cSaCV58UNzhT6q/Pvdq2RsxmlRtd9ll2zrbPjDT+MMqJmjmlc UyvrZhBXupIYxDENq/Bj4Fk06UPtdx/HT92CYDF7Eh5CZm3OvHLDp0WA+rWoomWl0GCq0ES hL+ezMeSCkgTjkWn5ZzY0JyA9ElKO9SY351eWlv6t3+XEc2T7MvxyGZ3a+32rpWFIqBSczX 5rU34HtzqFvTnCr+gSmGQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:oA6tTmbgh1Q=:aGNaqYhIyvyiNIe/w3AXNS V9jdbMUX/JOhb0tL+A8tlhVbNZQWvBIz4ThLnTIzX/SkXOZxl2U/0Vwag+jS+bMj1UL759aZO SBOyPJ3Ymgaxh7iaoo9S9ncw/inyllrwp6U6lh0LHxAL5nV+z3c0vwR9MDUQtEqGVXG5hewB2 ImRLcC3sN0NPB+BFw0JXWYkN8JdtdZv+KcIGiqomZE0uVCZX+kE96qQIrijt6EWwNdvkxh/jF asZIJcue7oahJsfJ6T3efnicQlxDRcX/0Big0yyL02y5dpJzPie4dkf5Z6wPadzH31HJvqVpp f9FPG0wCOtRbuJXWZ4l6dmj9qj2yP4wEL3BRaONC1RXBN6rW/ly5AmiCGjtoeKhZV6AVbKl31 W2k6O76XyVoaLo/Ax4JLzaquQP6tU6SKhdUxCpjCgBvABXesUWJ0uS/Uu2jkG30AGlkhKb31R 8WQMpLx5R/rAYpTdR5usM4kIpRRI0ecLW3EERVR8Iqf4EGjpMy/m4xZoEjIJLE08EvEW9xSXF cDn9T70fP2gOyDzQwc8+NXaVbOSYfjjYj/qxtkjSwz7AmlkBFAw1Hv4KeDwJJvNugCsWRPTvQ 66e2HqfggCM4it1iRleWJW/DIJAr/1USkSGxKU2BQKbwsATwBXD+YxAaCApmVaz0UfP/KcFPk RboCHEweXw7uhYNfM7qTNmOnovr/WI7g6cuSzjZ2b3TqeuRrJdwn1qR/W0YiXhm9cIHgdNWTc XjrXpg2R1GwmTR/R Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sunday 15 November 2015 15:54:13 Sinan Kaya wrote: > The Qualcomm Technologies HIDMA device has been designed > to support virtualization technology. The driver has been > divided into two to follow the hardware design. > > 1. HIDMA Management driver > 2. HIDMA Channel driver > > Each HIDMA HW consists of multiple channels. These channels > share some set of common parameters. These parameters are > initialized by the management driver during power up. > Same management driver is used for monitoring the execution > of the channels. Management driver can change the performance > behavior dynamically such as bandwidth allocation and > prioritization. > > The management driver is executed in hypervisor context and > is the main management entity for all channels provided by > the device. Sorry for asking this question so late, but can you explain what the point is behind this? It seems counterintuitive to me to have a DMA engine that is meant for speeding up memory-to-memory transfers when you run it in a virtual machine where you either need to go through a virtual IOMMU to set up page table entries, as that will likely cause more performance overhead than you could possibly gain, or you assume that all the guest memory is pinned, which in turn destroys a lot of the assumptions that we are making in KVM to have useful VM guests. Where am I going wrong here? > .../devicetree/bindings/dma/qcom_hidma_mgmt.txt | 61 ++++ > drivers/dma/qcom/Kconfig | 10 + > drivers/dma/qcom/Makefile | 1 + > drivers/dma/qcom/hidma_mgmt.c | 306 +++++++++++++++++++++ > drivers/dma/qcom/hidma_mgmt.h | 38 +++ > drivers/dma/qcom/hidma_mgmt_sys.c | 231 ++++++++++++++++ Each sysfs file API you add needs a documentation in Documentation/ABI/. Arnd