• M
    Revert "vring: Force use of DMA API for ARM-based systems with legacy devices" · 0d5415b4
    Michael S. Tsirkin 提交于
    This reverts commit c7070619.
    
    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: c7070619 ("vring: Force use of DMA API for ARM-based systems with legacy devices")
    Reported-by: NRobin Murphy <robin.murphy@arm.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: NWill Deacon <will.deacon@arm.com>
    Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
    Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
    0d5415b4
virtio_ring.c 33.2 KB