SHA256
1
0
forked from pool/qemu
qemu/0063-hw-arm-virt-mark-the-PCIe-host-cont.patch
Andreas Färber 1bce911f63 Accepting request 415568 from home:algraf:branches:Virtualization
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.6
* Patches added:
  0063-hw-arm-virt-mark-the-PCIe-host-cont.patch

- Fix ARM PCIe DMA coherency bug (bsc#991034)
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.6
* Patches added:
  0063-hw-arm-virt-mark-the-PCIe-host-cont.patch

- Fix ARM PCIe DMA coherency bug (bsc#991034)
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.6
* Patches added:
  0063-hw-arm-virt-mark-the-PCIe-host-cont.patch

OBS-URL: https://build.opensuse.org/request/show/415568
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=308
2016-07-28 14:00:10 +00:00

39 lines
1.7 KiB
Diff

From b38222880dde75c9e489f86af0b12a9e9a63b412 Mon Sep 17 00:00:00 2001
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Date: Mon, 4 Jul 2016 13:06:36 +0100
Subject: [PATCH] hw/arm/virt: mark the PCIe host controller as DMA coherent in
the DT
Since QEMU performs cacheable accesses to guest memory when doing DMA
as part of the implementation of emulated PCI devices, guest drivers
should use cacheable accesses as well when running under KVM. Since this
essentially means that emulated PCI devices are DMA coherent, set the
'dma-coherent' DT property on the PCIe host controller DT node.
This brings the DT description into line with the ACPI description,
which already marks the PCI bridge as cache coherent (see commit
bc64b96c984abf).
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Message-id: 1467134090-5099-1-git-send-email-ard.biesheuvel@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 5d636e21c44ecf982a22a7bc4ca89186079ac283)
Signed-off-by: Alexander Graf <agraf@suse.de>
---
hw/arm/virt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 56d35c7..9d015d5 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -950,6 +950,7 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic,
qemu_fdt_setprop_cell(vbi->fdt, nodename, "#size-cells", 2);
qemu_fdt_setprop_cells(vbi->fdt, nodename, "bus-range", 0,
nr_pcie_buses - 1);
+ qemu_fdt_setprop(vbi->fdt, nodename, "dma-coherent", NULL, 0);
if (vbi->v2m_phandle) {
qemu_fdt_setprop_cells(vbi->fdt, nodename, "msi-parent",