[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 2/2] arm/virt: Mark pcie controller node as dma-co
From: |
Bogdan Purcareata |
Subject: |
Re: [Qemu-arm] [PATCH 2/2] arm/virt: Mark pcie controller node as dma-coherent |
Date: |
Wed, 29 Jun 2016 07:52:03 +0000 |
On 28.06.2016 17:16, Peter Maydell wrote:
> On 16 June 2016 at 14:58, Ard Biesheuvel <address@hidden> wrote:
>> On 2 June 2016 at 14:45, Alexander Graf <address@hidden> wrote:
>>> On 02.06.16 14:32, Peter Maydell wrote:
>>>> This patch seems to change the property of the emulated PCIe controller
>>>> 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...)
>>>
>>> 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.
>
>> As far as I understand it, the purely emulated case should be marked
>> DMA coherent, since otherwise, guest drivers may perform cache
>> maintenance that the host is not expecting. This is especially harmful
>> if the guest invalidates the caches after a device to memory transfer,
>> which may result in data being lost if the data was only present in
>> the caches to begin with (which is the case for devices that are
>> emulated by the host)
>
> So the consensus seems to be that:
> * emulated PCI devices definitely need dma-coherent
> * passthrough devices where the host controller is dma-coherent
> also need dma-coherent
> * passthrough devices where the host controller is not dma-coherent
> don't want dma-coherent, but we have to set things per-PCI-controller
>
> Would somebody like to write a patch which just unconditionally
> sets the dma-coherent property on our PCI controller dt node?
I will send this patch later today.
Best regards,
Bogdan P.
> That seems a clear improvement on what we have at the moment.
> We can look at whether we want to support passthrough from a
> non-dma-coherent host pci controller (via a 2nd guest pci controller?)
> later...
>
> thanks
> -- PMM
>
- [Qemu-arm] [PATCH 0/2] arm/virt: Propagate pcie DMA coherency, Bogdan Purcareata, 2016/06/02
- Re: [Qemu-arm] [Qemu-devel] [PATCH 2/2] arm/virt: Mark pcie controller node as dma-coherent, Mihai Claudiu Caraman, 2016/06/03
- Re: [Qemu-arm] [Qemu-devel] [PATCH 2/2] arm/virt: Mark pcie controller node as dma-coherent, Peter Maydell, 2016/06/03
- Re: [Qemu-arm] [Qemu-devel] [PATCH 2/2] arm/virt: Mark pcie controller node as dma-coherent, agraf, 2016/06/03
- Re: [Qemu-arm] [Qemu-devel] [PATCH 2/2] arm/virt: Mark pcie controller node as dma-coherent, Mihai Claudiu Caraman, 2016/06/03
- Re: [Qemu-arm] [Qemu-devel] [PATCH 2/2] arm/virt: Mark pcie controller node as dma-coherent, Alexander Graf, 2016/06/03
- Re: [Qemu-arm] [Qemu-devel] [PATCH 2/2] arm/virt: Mark pcie controller node as dma-coherent, Mihai Claudiu Caraman, 2016/06/03