qemu-ppc
[Top][All Lists]
Advanced

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

[Qemu-ppc] [PATCH] spapr_pci: turn IOMMU root into an I/O region


From: Greg Kurz
Subject: [Qemu-ppc] [PATCH] spapr_pci: turn IOMMU root into an I/O region
Date: Tue, 26 Aug 2014 18:40:24 +0200
User-agent: StGit/0.17-dirty

On sPAPR, virtio devices are connected to the PCI bus and use MSI-X.
Commit cc943c36faa192cd4b32af8fe5edb31894017d35 has modified MSI-X
so that writes are made using the bus master address space.
Unfortunately, the MSI-X notification hits unassigned_mem_write and
never reaches the guest... The most visible effect is that all
virtio devices are non-fonctionnal on sPAPR. :(

This patch plugs the MSI memory ops to the root IOMMU region, and
virtio devices work again. I am not sure this is the right way to
fix: please comment and enlight !

Signed-off-by: Greg Kurz <address@hidden>
---
 hw/ppc/spapr_pci.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 9ed39a9..b638a3c 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -599,8 +599,9 @@ static void spapr_phb_realize(DeviceState *dev, Error 
**errp)
      */
     sprintf(namebuf, "%s.iommu-root", sphb->dtbusname);
 
-    memory_region_init(&sphb->iommu_root, OBJECT(sphb),
-                       namebuf, UINT64_MAX);
+    memory_region_init_io(&sphb->iommu_root, OBJECT(sphb),
+                          &spapr_msi_ops, spapr,
+                          namebuf, UINT64_MAX);
     address_space_init(&sphb->iommu_as, &sphb->iommu_root,
                        sphb->dtbusname);
 




reply via email to

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