Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751747AbdISVz0 (ORCPT ); Tue, 19 Sep 2017 17:55:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:55826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751517AbdISVzY (ORCPT ); Tue, 19 Sep 2017 17:55:24 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 280B921456 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=sstabellini@kernel.org Date: Tue, 19 Sep 2017 14:55:22 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-X260 To: Boris Ostrovsky cc: Stefano Stabellini , Greg KH , stable@vger.kernel.org, linux-kernel@vger.kernel.org, julien.grall@arm.com, jgross@suse.com Subject: Re: [BACKPORT] swiotlb-xen: implement xen_swiotlb_dma_mmap callback In-Reply-To: <20abb053-64fc-c7a3-066f-6d1491f13108@oracle.com> Message-ID: References: <20170916012352.GA21774@kroah.com> <20abb053-64fc-c7a3-066f-6d1491f13108@oracle.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2265 Lines: 51 On Mon, 18 Sep 2017, Boris Ostrovsky wrote: > On 09/18/2017 02:08 PM, Stefano Stabellini wrote: > > On Fri, 15 Sep 2017, Greg KH wrote: > >> On Thu, Sep 14, 2017 at 04:23:05PM -0700, Stefano Stabellini wrote: > >>> Hi all, > >>> > >>> We are getting reports from Xen on ARM users about DMA issues. The > >>> problem is that the commit below > >>> (7e91c7df29b5e196de3dc6f086c8937973bd0b88) is necessary to support mmap > >>> on Xen on ARM. It is self-contained and doesn't affect anything outside > >>> of Xen on ARM, so I think is a good candidate for backporting. It went > >>> upstream in 4.11. > >> But it's a new feature, right? How does that fit the stable kernel > >> rules? > > It implements a previously unimplemented function (mmap), although it > > calls the generic functions to do it. Yes, I agree with you that it > > can be classified as a new feature. If that is against the stable kernel > > rules, then please discard this request. > > > > FYI the reason why it didn't raise a flag in my mind is that users > > reported something like "unhandled alignment fault (11) at > > 0xffffa6048080, esr 0x92000061", which really looks more like a bug. > > > > > >>> Could you please backport the following commit: > >>> > >>> commit 7e91c7df29b5e196de3dc6f086c8937973bd0b88 > >>> Author: Stefano Stabellini > >>> Date: Tue Feb 7 19:58:02 2017 +0200 > >>> > >>> swiotlb-xen: implement xen_swiotlb_dma_mmap callback > >>> > >>> This function creates userspace mapping for the DMA-coherent memory. > >>> > >>> to the stable trees up until 3.14? > >>> > >>> > >>> Because of 00085f1efa387a8ce100e3734920f7639c80caa3 "dma-mapping: use > >>> unsigned long for dma_attrs", the appended patch (to be applied on top) > >>> is required for trees older than 4.8. > >> What does the kvm maintainers think about this? > > That would be the Xen maintainers right? In that case, Boris, Juergen, > > please let us know what you think. > > > This is a nop for x86 so it's safe from that perspective. I can't find > mmap op for ARM though (xen_get_dma_ops(dev)->mmap). arch/arm/mm/dma-mapping.c:arm_dma_mmap arch/arm/mm/dma-mapping.c:arm_coherent_dma_mmap arch/arm64/mm/dma-mapping.c:__swiotlb_mmap