All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows
@ 2015-02-23  8:33 Alexey Kardashevskiy
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 01/10] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows Alexey Kardashevskiy
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

These I have in my DDW working tree for quite a while, while I am polishing
others, there could go to some tree already.

Please comment. Thanks!


Alexey Kardashevskiy (10):
  spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows
  spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe
  spapr_pci: Introduce a liobn number generating macros
  spapr_vio: Introduce a liobn number generating macros
  spapr_pci: Define default DMA window size as a macro
  spapr_iommu: Add separate trace points for PCI DMA operations
  spapr_pci: Make find_phb()/find_dev() public
  spapr_iommu: Make spapr_tce_find_by_liobn() public
  spapr_pci: Rework device-tree rendering
  spapr_iommu: Give unique QOM name to TCE table

 hw/ppc/spapr_iommu.c        | 44 +++++++++++++++++++++------------
 hw/ppc/spapr_pci.c          | 60 +++++++++++++++------------------------------
 hw/ppc/spapr_vio.c          |  2 +-
 include/hw/pci-host/spapr.h |  6 +++++
 include/hw/ppc/spapr.h      |  7 +++++-
 trace-events                |  4 +++
 6 files changed, 66 insertions(+), 57 deletions(-)

-- 
2.0.0

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 01/10] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
@ 2015-02-23  8:33 ` Alexey Kardashevskiy
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 02/10] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe Alexey Kardashevskiy
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

The existing KVM_CREATE_SPAPR_TCE ioctl only support 4G windows max as
the window size parameter to the kernel ioctl() is 32-bit so
there's no way of expressing a TCE window > 4GB.

We are going to add huge DMA windows support so this will create small
window and unexpectedly fail later.

This disables KVM_CREATE_SPAPR_TCE for windows bigger that 4GB.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
---
Changes:
v3:
* fixed commit log
* added cast to uint64_t
---
 hw/ppc/spapr_iommu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index f9f85c5..4de6ba1 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -125,11 +125,11 @@ static MemoryRegionIOMMUOps spapr_iommu_ops = {
 static int spapr_tce_table_realize(DeviceState *dev)
 {
     sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev);
+    uint64_t window_size = (uint64_t)tcet->nb_table << tcet->page_shift;
 
-    if (kvm_enabled()) {
+    if (kvm_enabled() && !(window_size >> 32)) {
         tcet->table = kvmppc_create_spapr_tce(tcet->liobn,
-                                              tcet->nb_table <<
-                                              tcet->page_shift,
+                                              window_size,
                                               &tcet->fd,
                                               tcet->vfio_accel);
     }
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 02/10] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 01/10] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows Alexey Kardashevskiy
@ 2015-02-23  8:33 ` Alexey Kardashevskiy
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 03/10] spapr_pci: Introduce a liobn number generating macros Alexey Kardashevskiy
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

PAPR is defined as big endian so TCEs need an adjustment so
does this patch.

This changes code to have ldq_be_phys() in one place.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/ppc/spapr_iommu.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index 4de6ba1..4b857e8 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -246,7 +246,7 @@ static target_ulong h_put_tce_indirect(PowerPCCPU *cpu,
     target_ulong ioba1 = ioba;
     target_ulong tce_list = args[2];
     target_ulong npages = args[3];
-    target_ulong ret = H_PARAMETER;
+    target_ulong ret = H_PARAMETER, tce = 0;
     sPAPRTCETable *tcet = spapr_tce_find_by_liobn(liobn);
     CPUState *cs = CPU(cpu);
     hwaddr page_mask, page_size;
@@ -266,7 +266,7 @@ static target_ulong h_put_tce_indirect(PowerPCCPU *cpu,
     for (i = 0; i < npages; ++i, ioba += page_size) {
         target_ulong off = (tce_list & ~SPAPR_TCE_RW) +
                                 i * sizeof(target_ulong);
-        target_ulong tce = ldq_phys(cs->as, off);
+        tce = ldq_be_phys(cs->as, off);
 
         ret = put_tce_emu(tcet, ioba, tce);
         if (ret) {
@@ -277,8 +277,7 @@ static target_ulong h_put_tce_indirect(PowerPCCPU *cpu,
     /* Trace last successful or the first problematic entry */
     i = i ? (i - 1) : 0;
     trace_spapr_iommu_indirect(liobn, ioba1, tce_list, i,
-                               ldq_phys(cs->as,
-                               tce_list + i * sizeof(target_ulong)),
+                               tce,
                                ret);
 
     return ret;
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 03/10] spapr_pci: Introduce a liobn number generating macros
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 01/10] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows Alexey Kardashevskiy
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 02/10] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe Alexey Kardashevskiy
@ 2015-02-23  8:33 ` Alexey Kardashevskiy
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 04/10] spapr_vio: " Alexey Kardashevskiy
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

We are going to have multiple DMA windows per PHB and we want them to
migrate so we need a predictable way of assigning LIOBNs.

This introduces a macro which makes up a LIOBN from fixed prefix,
PHB index (unique PHB id) and window number.

This introduces a SPAPR_PCI_DMA_WINDOW_NUM() to know the window number
from LIOBN. It is used to distinguish the default 32bit windows from
dynamic windows and avoid picking default DMA window properties from
a wrong TCE table.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
---
Changes:
v5:
* renamed parameters in SPAPR_PCI_LIOBN()
---
 hw/ppc/spapr_pci.c     | 4 ++--
 include/hw/ppc/spapr.h | 4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index cebdeb3..388fd53 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -508,7 +508,7 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp)
         }
 
         sphb->buid = SPAPR_PCI_BASE_BUID + sphb->index;
-        sphb->dma_liobn = SPAPR_PCI_BASE_LIOBN + sphb->index;
+        sphb->dma_liobn = SPAPR_PCI_LIOBN(sphb->index, 0);
 
         windows_base = SPAPR_PCI_WINDOW_BASE
             + sphb->index * SPAPR_PCI_WINDOW_SPACING;
@@ -849,7 +849,7 @@ static int spapr_phb_children_dt(Object *child, void *opaque)
     sPAPRTCETable *tcet;
 
     tcet = (sPAPRTCETable *) object_dynamic_cast(child, TYPE_SPAPR_TCE_TABLE);
-    if (!tcet) {
+    if (!tcet || SPAPR_PCI_DMA_WINDOW_NUM(tcet->liobn)) {
         return 0;
     }
 
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index a8e6817..6c702ca 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -443,7 +443,9 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
 #define SPAPR_TCE_PAGE_MASK    (SPAPR_TCE_PAGE_SIZE - 1)
 
 #define SPAPR_VIO_BASE_LIOBN    0x00000000
-#define SPAPR_PCI_BASE_LIOBN    0x80000000
+#define SPAPR_PCI_LIOBN(phb_index, window_num) \
+    (0x80000000 | ((phb_index) << 8) | (window_num))
+#define SPAPR_PCI_DMA_WINDOW_NUM(liobn) ((liobn) & 0xff)
 
 #define RTAS_ERROR_LOG_MAX      2048
 
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 04/10] spapr_vio: Introduce a liobn number generating macros
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
                   ` (2 preceding siblings ...)
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 03/10] spapr_pci: Introduce a liobn number generating macros Alexey Kardashevskiy
@ 2015-02-23  8:33 ` Alexey Kardashevskiy
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 05/10] spapr_pci: Define default DMA window size as a macro Alexey Kardashevskiy
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

This introduces a macro which makes up a LIOBN from fixed prefix and
VIO device address (@reg property).

This is to keep LIOBN macros rendering consistent - the same macro for
PCI has been added by the previous patch.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/ppc/spapr_vio.c     | 2 +-
 include/hw/ppc/spapr.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 245cdd7..8baab0a 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -468,7 +468,7 @@ static int spapr_vio_busdev_init(DeviceState *qdev)
     }
 
     if (pc->rtce_window_size) {
-        uint32_t liobn = SPAPR_VIO_BASE_LIOBN | dev->reg;
+        uint32_t liobn = SPAPR_VIO_LIOBN(dev->reg);
 
         memory_region_init(&dev->mrroot, OBJECT(dev), "iommu-spapr-root",
                            ram_size);
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 6c702ca..0dc72db 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -443,6 +443,7 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
 #define SPAPR_TCE_PAGE_MASK    (SPAPR_TCE_PAGE_SIZE - 1)
 
 #define SPAPR_VIO_BASE_LIOBN    0x00000000
+#define SPAPR_VIO_LIOBN(reg)    (0x00000000 | (reg))
 #define SPAPR_PCI_LIOBN(phb_index, window_num) \
     (0x80000000 | ((phb_index) << 8) | (window_num))
 #define SPAPR_PCI_DMA_WINDOW_NUM(liobn) ((liobn) & 0xff)
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 05/10] spapr_pci: Define default DMA window size as a macro
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
                   ` (3 preceding siblings ...)
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 04/10] spapr_vio: " Alexey Kardashevskiy
@ 2015-02-23  8:33 ` Alexey Kardashevskiy
  2015-02-24  5:01   ` David Gibson
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 06/10] spapr_iommu: Add separate trace points for PCI DMA operations Alexey Kardashevskiy
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

This gets rid of a magic constant describing the default DMA window size
for an emulated PHB.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 hw/ppc/spapr_pci.c          | 6 +++---
 include/hw/pci-host/spapr.h | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 388fd53..130c532 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -641,11 +641,11 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp)
 static void spapr_phb_finish_realize(sPAPRPHBState *sphb, Error **errp)
 {
     sPAPRTCETable *tcet;
+    uint32_t nb_table;
 
+    nb_table = SPAPR_PCI_DMA32_SIZE >> SPAPR_TCE_PAGE_SHIFT;
     tcet = spapr_tce_new_table(DEVICE(sphb), sphb->dma_liobn,
-                               0,
-                               SPAPR_TCE_PAGE_SHIFT,
-                               0x40000000 >> SPAPR_TCE_PAGE_SHIFT, false);
+                               0, SPAPR_TCE_PAGE_SHIFT, nb_table, false);
     if (!tcet) {
         error_setg(errp, "Unable to create TCE table for %s",
                    sphb->dtbusname);
diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index d725f0e..718bf59 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -110,6 +110,8 @@ struct sPAPRPHBVFIOState {
 
 #define SPAPR_PCI_MSI_WINDOW         0x40000000000ULL
 
+#define SPAPR_PCI_DMA32_SIZE         0x40000000
+
 static inline qemu_irq spapr_phb_lsi_qirq(struct sPAPRPHBState *phb, int pin)
 {
     return xics_get_qirq(spapr->icp, phb->lsi_table[pin].irq);
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 06/10] spapr_iommu: Add separate trace points for PCI DMA operations
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
                   ` (4 preceding siblings ...)
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 05/10] spapr_pci: Define default DMA window size as a macro Alexey Kardashevskiy
@ 2015-02-23  8:33 ` Alexey Kardashevskiy
  2015-02-24  5:11   ` David Gibson
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 07/10] spapr_pci: Make find_phb()/find_dev() public Alexey Kardashevskiy
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

This is to reduce VIO noise while debugging PCI DMA.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 hw/ppc/spapr_iommu.c   | 27 ++++++++++++++++++++-------
 include/hw/ppc/spapr.h |  1 +
 trace-events           |  4 ++++
 3 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index 4b857e8..1d6d4d8 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -276,10 +276,11 @@ static target_ulong h_put_tce_indirect(PowerPCCPU *cpu,
 
     /* Trace last successful or the first problematic entry */
     i = i ? (i - 1) : 0;
-    trace_spapr_iommu_indirect(liobn, ioba1, tce_list, i,
-                               tce,
-                               ret);
-
+    if (SPAPR_IS_PCI_LIOBN(liobn)) {
+        trace_spapr_iommu_pci_indirect(liobn, ioba1, tce_list, i, tce, ret);
+    } else {
+        trace_spapr_iommu_indirect(liobn, ioba1, tce_list, i, tce, ret);
+    }
     return ret;
 }
 
@@ -313,7 +314,11 @@ static target_ulong h_stuff_tce(PowerPCCPU *cpu, sPAPREnvironment *spapr,
             break;
         }
     }
-    trace_spapr_iommu_stuff(liobn, ioba, tce_value, npages, ret);
+    if (SPAPR_IS_PCI_LIOBN(liobn)) {
+        trace_spapr_iommu_pci_stuff(liobn, ioba, tce_value, npages, ret);
+    } else {
+        trace_spapr_iommu_stuff(liobn, ioba, tce_value, npages, ret);
+    }
 
     return ret;
 }
@@ -334,7 +339,11 @@ static target_ulong h_put_tce(PowerPCCPU *cpu, sPAPREnvironment *spapr,
 
         ret = put_tce_emu(tcet, ioba, tce);
     }
-    trace_spapr_iommu_put(liobn, ioba, tce, ret);
+    if (SPAPR_IS_PCI_LIOBN(liobn)) {
+        trace_spapr_iommu_pci_put(liobn, ioba, tce, ret);
+    } else {
+        trace_spapr_iommu_put(liobn, ioba, tce, ret);
+    }
 
     return ret;
 }
@@ -374,7 +383,11 @@ static target_ulong h_get_tce(PowerPCCPU *cpu, sPAPREnvironment *spapr,
             args[0] = tce;
         }
     }
-    trace_spapr_iommu_get(liobn, ioba, ret, tce);
+    if (SPAPR_IS_PCI_LIOBN(liobn)) {
+        trace_spapr_iommu_pci_get(liobn, ioba, ret, tce);
+    } else {
+        trace_spapr_iommu_get(liobn, ioba, ret, tce);
+    }
 
     return ret;
 }
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 0dc72db..9fadbe0 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -446,6 +446,7 @@ int spapr_rtas_device_tree_setup(void *fdt, hwaddr rtas_addr,
 #define SPAPR_VIO_LIOBN(reg)    (0x00000000 | (reg))
 #define SPAPR_PCI_LIOBN(phb_index, window_num) \
     (0x80000000 | ((phb_index) << 8) | (window_num))
+#define SPAPR_IS_PCI_LIOBN(liobn)   (!!((liobn) & 0x80000000))
 #define SPAPR_PCI_DMA_WINDOW_NUM(liobn) ((liobn) & 0xff)
 
 #define RTAS_ERROR_LOG_MAX      2048
diff --git a/trace-events b/trace-events
index f87b077..481c30e 100644
--- a/trace-events
+++ b/trace-events
@@ -1334,6 +1334,10 @@ spapr_iommu_put(uint64_t liobn, uint64_t ioba, uint64_t tce, uint64_t ret) "liob
 spapr_iommu_get(uint64_t liobn, uint64_t ioba, uint64_t ret, uint64_t tce) "liobn=%"PRIx64" ioba=0x%"PRIx64" ret=%"PRId64" tce=0x%"PRIx64
 spapr_iommu_indirect(uint64_t liobn, uint64_t ioba, uint64_t tce, uint64_t iobaN, uint64_t tceN, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tcelist=0x%"PRIx64" iobaN=0x%"PRIx64" tceN=0x%"PRIx64" ret=%"PRId64
 spapr_iommu_stuff(uint64_t liobn, uint64_t ioba, uint64_t tce_value, uint64_t npages, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tcevalue=0x%"PRIx64" npages=%"PRId64" ret=%"PRId64
+spapr_iommu_pci_put(uint64_t liobn, uint64_t ioba, uint64_t tce, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tce=0x%"PRIx64" ret=%"PRId64
+spapr_iommu_pci_get(uint64_t liobn, uint64_t ioba, uint64_t ret, uint64_t tce) "liobn=%"PRIx64" ioba=0x%"PRIx64" ret=%"PRId64" tce=0x%"PRIx64
+spapr_iommu_pci_indirect(uint64_t liobn, uint64_t ioba, uint64_t tce, uint64_t iobaN, uint64_t tceN, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tcelist=0x%"PRIx64" iobaN=0x%"PRIx64" tceN=0x%"PRIx64" ret=%"PRId64
+spapr_iommu_pci_stuff(uint64_t liobn, uint64_t ioba, uint64_t tce_value, uint64_t npages, uint64_t ret) "liobn=%"PRIx64" ioba=0x%"PRIx64" tcevalue=0x%"PRIx64" npages=%"PRId64" ret=%"PRId64
 spapr_iommu_xlate(uint64_t liobn, uint64_t ioba, uint64_t tce, unsigned perm, unsigned pgsize) "liobn=%"PRIx64" 0x%"PRIx64" -> 0x%"PRIx64" perm=%u mask=%x"
 spapr_iommu_new_table(uint64_t liobn, void *tcet, void *table, int fd) "liobn=%"PRIx64" tcet=%p table=%p fd=%d"
 
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 07/10] spapr_pci: Make find_phb()/find_dev() public
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
                   ` (5 preceding siblings ...)
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 06/10] spapr_iommu: Add separate trace points for PCI DMA operations Alexey Kardashevskiy
@ 2015-02-23  8:33 ` Alexey Kardashevskiy
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 08/10] spapr_iommu: Make spapr_tce_find_by_liobn() public Alexey Kardashevskiy
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

This makes find_phb()/find_dev() public and changed its names
to spapr_pci_find_phb()/spapr_pci_find_dev() as they are going to
be used from other parts of QEMU such as VFIO DDW (dynamic DMA window)
or VFIO PCI error injection or VFIO EEH handling - in all these
cases there are RTAS calls which are addressed to BUID+config_addr
in IEEE1275 format.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/ppc/spapr_pci.c          | 22 +++++++++++-----------
 include/hw/pci-host/spapr.h |  4 ++++
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 130c532..040b901 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -47,7 +47,7 @@
 #define RTAS_TYPE_MSI           1
 #define RTAS_TYPE_MSIX          2
 
-static sPAPRPHBState *find_phb(sPAPREnvironment *spapr, uint64_t buid)
+sPAPRPHBState *spapr_pci_find_phb(sPAPREnvironment *spapr, uint64_t buid)
 {
     sPAPRPHBState *sphb;
 
@@ -61,10 +61,10 @@ static sPAPRPHBState *find_phb(sPAPREnvironment *spapr, uint64_t buid)
     return NULL;
 }
 
-static PCIDevice *find_dev(sPAPREnvironment *spapr, uint64_t buid,
-                           uint32_t config_addr)
+PCIDevice *spapr_pci_find_dev(sPAPREnvironment *spapr, uint64_t buid,
+                              uint32_t config_addr)
 {
-    sPAPRPHBState *sphb = find_phb(spapr, buid);
+    sPAPRPHBState *sphb = spapr_pci_find_phb(spapr, buid);
     PCIHostState *phb = PCI_HOST_BRIDGE(sphb);
     int bus_num = (config_addr >> 16) & 0xFF;
     int devfn = (config_addr >> 8) & 0xFF;
@@ -95,7 +95,7 @@ static void finish_read_pci_config(sPAPREnvironment *spapr, uint64_t buid,
         return;
     }
 
-    pci_dev = find_dev(spapr, buid, addr);
+    pci_dev = spapr_pci_find_dev(spapr, buid, addr);
     addr = rtas_pci_cfgaddr(addr);
 
     if (!pci_dev || (addr % size) || (addr >= pci_config_size(pci_dev))) {
@@ -162,7 +162,7 @@ static void finish_write_pci_config(sPAPREnvironment *spapr, uint64_t buid,
         return;
     }
 
-    pci_dev = find_dev(spapr, buid, addr);
+    pci_dev = spapr_pci_find_dev(spapr, buid, addr);
     addr = rtas_pci_cfgaddr(addr);
 
     if (!pci_dev || (addr % size) || (addr >= pci_config_size(pci_dev))) {
@@ -280,9 +280,9 @@ static void rtas_ibm_change_msi(PowerPCCPU *cpu, sPAPREnvironment *spapr,
     }
 
     /* Fins sPAPRPHBState */
-    phb = find_phb(spapr, buid);
+    phb = spapr_pci_find_phb(spapr, buid);
     if (phb) {
-        pdev = find_dev(spapr, buid, config_addr);
+        pdev = spapr_pci_find_dev(spapr, buid, config_addr);
     }
     if (!phb || !pdev) {
         rtas_st(rets, 0, RTAS_OUT_PARAM_ERROR);
@@ -381,9 +381,9 @@ static void rtas_ibm_query_interrupt_source_number(PowerPCCPU *cpu,
     spapr_pci_msi *msi;
 
     /* Find sPAPRPHBState */
-    phb = find_phb(spapr, buid);
+    phb = spapr_pci_find_phb(spapr, buid);
     if (phb) {
-        pdev = find_dev(spapr, buid, config_addr);
+        pdev = spapr_pci_find_dev(spapr, buid, config_addr);
     }
     if (!phb || !pdev) {
         rtas_st(rets, 0, RTAS_OUT_PARAM_ERROR);
@@ -536,7 +536,7 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp)
         return;
     }
 
-    if (find_phb(spapr, sphb->buid)) {
+    if (spapr_pci_find_phb(spapr, sphb->buid)) {
         error_setg(errp, "PCI host bridges must have unique BUIDs");
         return;
     }
diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index 718bf59..1fa63db 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -127,4 +127,8 @@ void spapr_pci_msi_init(sPAPREnvironment *spapr, hwaddr addr);
 
 void spapr_pci_rtas_init(void);
 
+sPAPRPHBState *spapr_pci_find_phb(sPAPREnvironment *spapr, uint64_t buid);
+PCIDevice *spapr_pci_find_dev(sPAPREnvironment *spapr, uint64_t buid,
+                              uint32_t config_addr);
+
 #endif /* __HW_SPAPR_PCI_H__ */
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 08/10] spapr_iommu: Make spapr_tce_find_by_liobn() public
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
                   ` (6 preceding siblings ...)
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 07/10] spapr_pci: Make find_phb()/find_dev() public Alexey Kardashevskiy
@ 2015-02-23  8:33 ` Alexey Kardashevskiy
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 09/10] spapr_pci: Rework device-tree rendering Alexey Kardashevskiy
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

At the moment spapr_tce_find_by_liobn() is used by H_PUT_TCE/...
handlers to find an IOMMU by LIOBN.

We are going to implement Dynamic DMA windows (DDW), new code
will go to a new file and we will use spapr_tce_find_by_liobn()
there too so let's make it public.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/ppc/spapr_iommu.c   | 2 +-
 include/hw/ppc/spapr.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index 1d6d4d8..65ee001 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -41,7 +41,7 @@ enum sPAPRTCEAccess {
 
 static QLIST_HEAD(spapr_tce_tables, sPAPRTCETable) spapr_tce_tables;
 
-static sPAPRTCETable *spapr_tce_find_by_liobn(uint32_t liobn)
+sPAPRTCETable *spapr_tce_find_by_liobn(uint32_t liobn)
 {
     sPAPRTCETable *tcet;
 
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 9fadbe0..45be9a6 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -472,6 +472,7 @@ struct sPAPRTCETable {
     QLIST_ENTRY(sPAPRTCETable) list;
 };
 
+sPAPRTCETable *spapr_tce_find_by_liobn(uint32_t liobn);
 void spapr_events_init(sPAPREnvironment *spapr);
 void spapr_events_fdt_skel(void *fdt, uint32_t epow_irq);
 int spapr_h_cas_compose_response(target_ulong addr, target_ulong size);
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 09/10] spapr_pci: Rework device-tree rendering
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
                   ` (7 preceding siblings ...)
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 08/10] spapr_iommu: Make spapr_tce_find_by_liobn() public Alexey Kardashevskiy
@ 2015-02-23  8:33 ` Alexey Kardashevskiy
  2015-02-24  5:03   ` David Gibson
  2015-02-23  8:34 ` [Qemu-devel] [PATCH 10/10] spapr_iommu: Give unique QOM name to TCE table Alexey Kardashevskiy
  2015-03-10  3:51 ` [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
  10 siblings, 1 reply; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

This replaces object_child_foreach() and callback with existing
SPAPR_PCI_LIOBN() and spapr_tce_find_by_liobn() to make the code easier
to read.

This is a mechanical patch so no behaviour change is expected.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 hw/ppc/spapr_pci.c | 30 +++++-------------------------
 1 file changed, 5 insertions(+), 25 deletions(-)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 040b901..5b53f4e 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -838,29 +838,6 @@ PCIHostState *spapr_create_phb(sPAPREnvironment *spapr, int index)
 #define b_fff(x)        b_x((x), 8, 3)  /* function number */
 #define b_rrrrrrrr(x)   b_x((x), 0, 8)  /* register number */
 
-typedef struct sPAPRTCEDT {
-    void *fdt;
-    int node_off;
-} sPAPRTCEDT;
-
-static int spapr_phb_children_dt(Object *child, void *opaque)
-{
-    sPAPRTCEDT *p = opaque;
-    sPAPRTCETable *tcet;
-
-    tcet = (sPAPRTCETable *) object_dynamic_cast(child, TYPE_SPAPR_TCE_TABLE);
-    if (!tcet || SPAPR_PCI_DMA_WINDOW_NUM(tcet->liobn)) {
-        return 0;
-    }
-
-    spapr_dma_dt(p->fdt, p->node_off, "ibm,dma-window",
-                 tcet->liobn, tcet->bus_offset,
-                 tcet->nb_table << tcet->page_shift);
-    /* Stop after the first window */
-
-    return 1;
-}
-
 int spapr_populate_pci_dt(sPAPRPHBState *phb,
                           uint32_t xics_phandle,
                           void *fdt)
@@ -899,6 +876,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,
     uint32_t interrupt_map_mask[] = {
         cpu_to_be32(b_ddddd(-1)|b_fff(0)), 0x0, 0x0, cpu_to_be32(-1)};
     uint32_t interrupt_map[PCI_SLOT_MAX * PCI_NUM_PINS][7];
+    sPAPRTCETable *tcet;
 
     /* Start populating the FDT */
     sprintf(nodename, "pci@%" PRIx64, phb->buid);
@@ -951,8 +929,10 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,
     _FDT(fdt_setprop(fdt, bus_off, "interrupt-map", &interrupt_map,
                      sizeof(interrupt_map)));
 
-    object_child_foreach(OBJECT(phb), spapr_phb_children_dt,
-                         &((sPAPRTCEDT){ .fdt = fdt, .node_off = bus_off }));
+    tcet = spapr_tce_find_by_liobn(SPAPR_PCI_LIOBN(phb->index, 0));
+    spapr_dma_dt(fdt, bus_off, "ibm,dma-window",
+                 tcet->liobn, tcet->bus_offset,
+                 tcet->nb_table << tcet->page_shift);
 
     return 0;
 }
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Qemu-devel] [PATCH 10/10] spapr_iommu: Give unique QOM name to TCE table
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
                   ` (8 preceding siblings ...)
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 09/10] spapr_pci: Rework device-tree rendering Alexey Kardashevskiy
@ 2015-02-23  8:34 ` Alexey Kardashevskiy
  2015-02-24  5:09   ` David Gibson
  2015-03-10  3:51 ` [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
  10 siblings, 1 reply; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-02-23  8:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf

Useful for debugging.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 hw/ppc/spapr_iommu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index 65ee001..4f4836c 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -160,6 +160,7 @@ sPAPRTCETable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn,
                                    bool vfio_accel)
 {
     sPAPRTCETable *tcet;
+    char tmp[64];
 
     if (spapr_tce_find_by_liobn(liobn)) {
         fprintf(stderr, "Attempted to create TCE table with duplicate"
@@ -178,7 +179,8 @@ sPAPRTCETable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn,
     tcet->nb_table = nb_table;
     tcet->vfio_accel = vfio_accel;
 
-    object_property_add_child(OBJECT(owner), "tce-table", OBJECT(tcet), NULL);
+    snprintf(tmp, sizeof(tmp), "tce-table-%x", liobn);
+    object_property_add_child(OBJECT(owner), tmp, OBJECT(tcet), NULL);
 
     object_property_set_bool(OBJECT(tcet), true, "realized", NULL);
 
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 05/10] spapr_pci: Define default DMA window size as a macro
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 05/10] spapr_pci: Define default DMA window size as a macro Alexey Kardashevskiy
@ 2015-02-24  5:01   ` David Gibson
  0 siblings, 0 replies; 18+ messages in thread
From: David Gibson @ 2015-02-24  5:01 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-ppc, qemu-devel, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 485 bytes --]

On Mon, Feb 23, 2015 at 07:33:55PM +1100, Alexey Kardashevskiy wrote:
> This gets rid of a magic constant describing the default DMA window size
> for an emulated PHB.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 09/10] spapr_pci: Rework device-tree rendering
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 09/10] spapr_pci: Rework device-tree rendering Alexey Kardashevskiy
@ 2015-02-24  5:03   ` David Gibson
  0 siblings, 0 replies; 18+ messages in thread
From: David Gibson @ 2015-02-24  5:03 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-ppc, qemu-devel, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

On Mon, Feb 23, 2015 at 07:33:59PM +1100, Alexey Kardashevskiy wrote:
> This replaces object_child_foreach() and callback with existing
> SPAPR_PCI_LIOBN() and spapr_tce_find_by_liobn() to make the code easier
> to read.
> 
> This is a mechanical patch so no behaviour change is expected.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 10/10] spapr_iommu: Give unique QOM name to TCE table
  2015-02-23  8:34 ` [Qemu-devel] [PATCH 10/10] spapr_iommu: Give unique QOM name to TCE table Alexey Kardashevskiy
@ 2015-02-24  5:09   ` David Gibson
  0 siblings, 0 replies; 18+ messages in thread
From: David Gibson @ 2015-02-24  5:09 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-ppc, qemu-devel, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]

On Mon, Feb 23, 2015 at 07:34:00PM +1100, Alexey Kardashevskiy wrote:
> Useful for debugging.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  hw/ppc/spapr_iommu.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
> index 65ee001..4f4836c 100644
> --- a/hw/ppc/spapr_iommu.c
> +++ b/hw/ppc/spapr_iommu.c
> @@ -160,6 +160,7 @@ sPAPRTCETable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn,
>                                     bool vfio_accel)
>  {
>      sPAPRTCETable *tcet;
> +    char tmp[64];
>  
>      if (spapr_tce_find_by_liobn(liobn)) {
>          fprintf(stderr, "Attempted to create TCE table with duplicate"
> @@ -178,7 +179,8 @@ sPAPRTCETable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn,
>      tcet->nb_table = nb_table;
>      tcet->vfio_accel = vfio_accel;
>  
> -    object_property_add_child(OBJECT(owner), "tce-table", OBJECT(tcet), NULL);
> +    snprintf(tmp, sizeof(tmp), "tce-table-%x", liobn);
> +    object_property_add_child(OBJECT(owner), tmp, OBJECT(tcet), NULL);
>  
>      object_property_set_bool(OBJECT(tcet), true, "realized", NULL);
>  

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 06/10] spapr_iommu: Add separate trace points for PCI DMA operations
  2015-02-23  8:33 ` [Qemu-devel] [PATCH 06/10] spapr_iommu: Add separate trace points for PCI DMA operations Alexey Kardashevskiy
@ 2015-02-24  5:11   ` David Gibson
  0 siblings, 0 replies; 18+ messages in thread
From: David Gibson @ 2015-02-24  5:11 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-ppc, qemu-devel, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 653 bytes --]

On Mon, Feb 23, 2015 at 07:33:56PM +1100, Alexey Kardashevskiy wrote:
> This is to reduce VIO noise while debugging PCI DMA.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

So, in terms of mechanical correctness:

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

I see the rationale, but the idea of conditional tracepoints seems a
bit icky to me.  Don't know if the trace infrastructure people would
have any opinion on this.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows
  2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
                   ` (9 preceding siblings ...)
  2015-02-23  8:34 ` [Qemu-devel] [PATCH 10/10] spapr_iommu: Give unique QOM name to TCE table Alexey Kardashevskiy
@ 2015-03-10  3:51 ` Alexey Kardashevskiy
  2015-03-17 11:03   ` Alexey Kardashevskiy
  10 siblings, 1 reply; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-03-10  3:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, Alexander Graf

On 02/23/2015 07:33 PM, Alexey Kardashevskiy wrote:
> These I have in my DDW working tree for quite a while, while I am polishing
> others, there could go to some tree already.
>
> Please comment. Thanks!

Alex, ping.

"spapr_pci: Make find_phb()/find_dev() public" won't apply after Gavin's 
EEH patches but the others would, should I repost them together with DDW 
patches or separately or any other suggestion about these? Thanks.


>
>
> Alexey Kardashevskiy (10):
>    spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows
>    spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe
>    spapr_pci: Introduce a liobn number generating macros
>    spapr_vio: Introduce a liobn number generating macros
>    spapr_pci: Define default DMA window size as a macro
>    spapr_iommu: Add separate trace points for PCI DMA operations
>    spapr_pci: Make find_phb()/find_dev() public
>    spapr_iommu: Make spapr_tce_find_by_liobn() public
>    spapr_pci: Rework device-tree rendering
>    spapr_iommu: Give unique QOM name to TCE table
>
>   hw/ppc/spapr_iommu.c        | 44 +++++++++++++++++++++------------
>   hw/ppc/spapr_pci.c          | 60 +++++++++++++++------------------------------
>   hw/ppc/spapr_vio.c          |  2 +-
>   include/hw/pci-host/spapr.h |  6 +++++
>   include/hw/ppc/spapr.h      |  7 +++++-
>   trace-events                |  4 +++
>   6 files changed, 66 insertions(+), 57 deletions(-)
>


-- 
Alexey

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows
  2015-03-10  3:51 ` [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
@ 2015-03-17 11:03   ` Alexey Kardashevskiy
  2015-03-24  6:12     ` David Gibson
  0 siblings, 1 reply; 18+ messages in thread
From: Alexey Kardashevskiy @ 2015-03-17 11:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, Alexander Graf

On 03/10/2015 02:51 PM, Alexey Kardashevskiy wrote:
> On 02/23/2015 07:33 PM, Alexey Kardashevskiy wrote:
>> These I have in my DDW working tree for quite a while, while I am polishing
>> others, there could go to some tree already.
>>
>> Please comment. Thanks!
>
> Alex, ping.
>
> "spapr_pci: Make find_phb()/find_dev() public" won't apply after Gavin's
> EEH patches but the others would, should I repost them together with DDW
> patches or separately or any other suggestion about these? Thanks.


Ping?
Do I need to repost those when I'll be posting next respin of DDW for QEMU 
or you can take them into your ppc-next-2.4? Thanks


>
>
>>
>>
>> Alexey Kardashevskiy (10):
>>    spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows
>>    spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe
>>    spapr_pci: Introduce a liobn number generating macros
>>    spapr_vio: Introduce a liobn number generating macros
>>    spapr_pci: Define default DMA window size as a macro
>>    spapr_iommu: Add separate trace points for PCI DMA operations
>>    spapr_pci: Make find_phb()/find_dev() public
>>    spapr_iommu: Make spapr_tce_find_by_liobn() public
>>    spapr_pci: Rework device-tree rendering
>>    spapr_iommu: Give unique QOM name to TCE table
>>
>>   hw/ppc/spapr_iommu.c        | 44 +++++++++++++++++++++------------
>>   hw/ppc/spapr_pci.c          | 60
>> +++++++++++++++------------------------------
>>   hw/ppc/spapr_vio.c          |  2 +-
>>   include/hw/pci-host/spapr.h |  6 +++++
>>   include/hw/ppc/spapr.h      |  7 +++++-
>>   trace-events                |  4 +++
>>   6 files changed, 66 insertions(+), 57 deletions(-)
>>
>
>


-- 
Alexey

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows
  2015-03-17 11:03   ` Alexey Kardashevskiy
@ 2015-03-24  6:12     ` David Gibson
  0 siblings, 0 replies; 18+ messages in thread
From: David Gibson @ 2015-03-24  6:12 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-ppc, qemu-devel, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

On Tue, Mar 17, 2015 at 10:03:49PM +1100, Alexey Kardashevskiy wrote:
> On 03/10/2015 02:51 PM, Alexey Kardashevskiy wrote:
> >On 02/23/2015 07:33 PM, Alexey Kardashevskiy wrote:
> >>These I have in my DDW working tree for quite a while, while I am polishing
> >>others, there could go to some tree already.
> >>
> >>Please comment. Thanks!
> >
> >Alex, ping.
> >
> >"spapr_pci: Make find_phb()/find_dev() public" won't apply after Gavin's
> >EEH patches but the others would, should I repost them together with DDW
> >patches or separately or any other suggestion about these? Thanks.
> 
> 
> Ping?
> Do I need to repost those when I'll be posting next respin of DDW for QEMU
> or you can take them into your ppc-next-2.4? Thanks

I've merged these into my new spapr-next tree (branch 'spapr-next' at
git://github.com/dgibson/qemu.git).  I'll be pushing that tree to Alex
in future.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-03-24  6:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23  8:33 [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
2015-02-23  8:33 ` [Qemu-devel] [PATCH 01/10] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows Alexey Kardashevskiy
2015-02-23  8:33 ` [Qemu-devel] [PATCH 02/10] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe Alexey Kardashevskiy
2015-02-23  8:33 ` [Qemu-devel] [PATCH 03/10] spapr_pci: Introduce a liobn number generating macros Alexey Kardashevskiy
2015-02-23  8:33 ` [Qemu-devel] [PATCH 04/10] spapr_vio: " Alexey Kardashevskiy
2015-02-23  8:33 ` [Qemu-devel] [PATCH 05/10] spapr_pci: Define default DMA window size as a macro Alexey Kardashevskiy
2015-02-24  5:01   ` David Gibson
2015-02-23  8:33 ` [Qemu-devel] [PATCH 06/10] spapr_iommu: Add separate trace points for PCI DMA operations Alexey Kardashevskiy
2015-02-24  5:11   ` David Gibson
2015-02-23  8:33 ` [Qemu-devel] [PATCH 07/10] spapr_pci: Make find_phb()/find_dev() public Alexey Kardashevskiy
2015-02-23  8:33 ` [Qemu-devel] [PATCH 08/10] spapr_iommu: Make spapr_tce_find_by_liobn() public Alexey Kardashevskiy
2015-02-23  8:33 ` [Qemu-devel] [PATCH 09/10] spapr_pci: Rework device-tree rendering Alexey Kardashevskiy
2015-02-24  5:03   ` David Gibson
2015-02-23  8:34 ` [Qemu-devel] [PATCH 10/10] spapr_iommu: Give unique QOM name to TCE table Alexey Kardashevskiy
2015-02-24  5:09   ` David Gibson
2015-03-10  3:51 ` [Qemu-devel] [PATCH 00/10] spapr: Small patches to prepare for Dynamic DMA windows Alexey Kardashevskiy
2015-03-17 11:03   ` Alexey Kardashevskiy
2015-03-24  6:12     ` David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.