From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753210AbdBCJ50 (ORCPT ); Fri, 3 Feb 2017 04:57:26 -0500 Received: from foss.arm.com ([217.140.101.70]:45972 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752989AbdBCJ5Y (ORCPT ); Fri, 3 Feb 2017 04:57:24 -0500 Date: Fri, 3 Feb 2017 09:57:19 +0000 From: Will Deacon To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, Robin Murphy , stable@vger.kernel.org, Marc Zyngier , Jason Wang , virtualization@lists.linux-foundation.org Subject: Re: [PATCH] Revert "vring: Force use of DMA API for ARM-based systems with legacy devices" Message-ID: <20170203095718.GB11585@arm.com> References: <1486093716-17120-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1486093716-17120-1-git-send-email-mst@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 03, 2017 at 05:49:11AM +0200, Michael S. Tsirkin wrote: > This reverts commit c7070619f3408d9a0dffbed9149e6f00479cf43b. > > This has been shown to regress on some ARM systems: > > by forcing on DMA API usage for ARM systems, we have inadvertently > kicked open a hornets' nest in terms of cache-coherency. Namely that > unless the virtio device is explicitly described as capable of coherent > DMA by firmware, the DMA APIs on ARM and other DT-based platforms will > assume it is non-coherent. This turns out to cause a big problem for the > likes of QEMU and kvmtool, which generate virtio-mmio devices in their > guest DTs but neglect to add the often-overlooked "dma-coherent" > property; as a result, we end up with the guest making non-cacheable > accesses to the vring, the host doing so cacheably, both talking past > each other and things going horribly wrong. > > We are working on a safer work-around. > > Fixes: c7070619f340 ("vring: Force use of DMA API for ARM-based systems with legacy devices") > Reported-by: Robin Murphy > Cc: > Signed-off-by: Will Deacon > Signed-off-by: Michael S. Tsirkin > Acked-by: Marc Zyngier > --- > > I'll merge this for 4.10. Let's fix it properly for 4.11. Acked-by: Will Deacon Will