From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [PATCH v4 2/8] s390/cio: introduce DMA pools to cio Date: Tue, 11 Jun 2019 11:55:29 +0200 Message-ID: <20190611115529.6e3ae12d.cohuck@redhat.com> References: <20190606115127.55519-1-pasic@linux.ibm.com> <20190606115127.55519-3-pasic@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190606115127.55519-3-pasic@linux.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Halil Pasic Cc: Vasily Gorbik , linux-s390@vger.kernel.org, Thomas Huth , Claudio Imbrenda , kvm@vger.kernel.org, Sebastian Ott , "Michael S. Tsirkin" , Farhan Ali , Heiko Carstens , Eric Farman , virtualization@lists.linux-foundation.org, Christoph Hellwig , Christian Borntraeger , "Jason J. Herne" , Michael Mueller , Viktor Mihajlovski , Janosch Frank List-Id: virtualization@lists.linuxfoundation.org On Thu, 6 Jun 2019 13:51:21 +0200 Halil Pasic wrote: > To support protected virtualization cio will need to make sure the > memory used for communication with the hypervisor is DMA memory. > > Let us introduce one global pool for cio. > > Our DMA pools are implemented as a gen_pool backed with DMA pages. The > idea is to avoid each allocation effectively wasting a page, as we > typically allocate much less than PAGE_SIZE. > > Signed-off-by: Halil Pasic > Reviewed-by: Sebastian Ott > --- > arch/s390/Kconfig | 1 + > arch/s390/include/asm/cio.h | 11 +++ > drivers/s390/cio/css.c | 131 ++++++++++++++++++++++++++++++++++-- > 3 files changed, 139 insertions(+), 4 deletions(-) (...) > +void cio_gp_dma_destroy(struct gen_pool *gp_dma, struct device *dma_dev) > +{ > + if (!gp_dma) > + return; > + /* this is qite ugly but no better idea */ typo: s/qite/quite/ > + gen_pool_for_each_chunk(gp_dma, __gp_dma_free_dma, dma_dev); > + gen_pool_destroy(gp_dma); > +} (...) Reviewed-by: Cornelia Huck