Received: from eggs.gnu.org ([2001:4830:134:3::10]:56751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bABuY-0008Ms-CJ for qemu-devel@nongnu.org; Tue, 07 Jun 2016 03:58:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bABuX-0006yf-Cy for qemu-devel@nongnu.org; Tue, 07 Jun 2016 03:58:54 -0400 References: <1464870382-385-1-git-send-email-bogdan.purcareata@nxp.com> <1464870382-385-3-git-send-email-bogdan.purcareata@nxp.com> <9d7c8c4e-1445-87d8-f367-8b3773c38365@suse.de> From: Auger Eric Message-ID: <3110383c-909d-92de-333b-89b687dcacac@redhat.com> Date: Tue, 7 Jun 2016 09:58:41 +0200 MIME-Version: 1.0 In-Reply-To: <9d7c8c4e-1445-87d8-f367-8b3773c38365@suse.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] arm/virt: Mark pcie controller node as dma-coherent List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Peter Maydell , Bogdan Purcareata Cc: Eric Auger , Peter Crosthwaite , qemu-arm , QEMU Developers , Will Deacon , Ard Biesheuvel Hi, Le 02/06/2016 =C3=A0 14:45, Alexander Graf a =C3=A9crit : >=20 >=20 > On 02.06.16 14:32, Peter Maydell wrote: >> On 2 June 2016 at 13:26, Bogdan Purcareata = wrote: >>> A PCI device is marked either as coherent or non-coherent based on th= e pcie >>> controller "dma-coherent" property. This is further used when configu= ring the >>> IOMMU ops for the device DMA resources (e.g. descriptor rings, for e1= 000e). >>> >>> This dma-coherent property needs to be configured in the guest enviro= nment, >>> in case there's a directly assigned VFIO PCI device. Since the guest = only >>> receives one emulated pcie controller bus - regardless of the host >>> configuration - add this property if there's at least one host pcie h= ost >>> controller that is DMA coherent (this implies that the host interconn= ect >>> is coherent as well). >> >> This patch seems to change the property of the emulated PCIe controlle= r >> based on the host PCIe controller even if we're not doing any PCIe >> passthrough at all. That seems definitely wrong to me. >> >> (Should the purely-emulated case be marked DMA-coherent anyway? >> I forget the fiddly details...) >=20 > I do too, let's involve a few people who know :). Not exposing it as > coherent is definitely wrong, but whether "dma-coherent" is the right > choice I don't know. For information, on AMD overdrive the PCI host controller is marked as dma-coherent too but I do not observe any issue with 82574L (e1000e) and it worked fine as well on X540T1 Intel NIC. I just tested with e1000e and dma-coherent guest PCI controller and works fine too. Don't have x540t1 anymore so can't test with that PCIe CARD. With Intel I35OT1 and guest non dma-coherent PCIe controller I cope with some issues when assigning the PF but I don't know yet if there is any relationship. Best Regards Eric >=20 >=20 > Alex >=20