[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-arm] [PATCH 0/2] arm/virt: Propagate pcie DMA coherency

From: Bogdan Purcareata
Subject: [Qemu-arm] [PATCH 0/2] arm/virt: Propagate pcie DMA coherency
Date: Thu, 2 Jun 2016 12:26:20 +0000

A PCI device is marked as coherent according to the "dma-coherent"
attribute of itself or of the associated controller. This property will
determine how it will issue DMA transactions, and how it will map its DMA
memory. When passing the PCI device to the guest using VFIO PCI, this
isn't taken into account. QEMU emulates a single generic pcie controller,
regardless of how many PCI devices are passed to the guest and to which host
controllers they are attached to. Also, the device need not be described in
the device tree at all (e.g. e1000e).

In a scenario involving aarch64 and ARM SMMU v2, I noticed that without the
dma-coherent property of the guest pcie controller, the eth interface
descriptor rings read stale data without explicit flushes - hence causing
VFIO PCI to not work. Since the host pcie controllers and interconnect are
coherent and described in the host device tree accordingly, this needs to
be passed to the guest as well.

Add a routine and device tree helper to configure the guest pcie controller
based on the host device tree.

Bogdan Purcareata (2):
  device_tree: introduce qemu_fdt_node_path_prop
  arm/virt: Mark pcie controller node as dma-coherent

 device_tree.c                | 59 ++++++++++++++++++++++++++++++++++++++++++++
 hw/arm/virt.c                | 31 +++++++++++++++++++++++
 include/sysemu/device_tree.h | 20 +++++++++++++++
 3 files changed, 110 insertions(+)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]