[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 06/33] spapr_pci: Define default DMA window size as a
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 06/33] spapr_pci: Define default DMA window size as a macro |
Date: |
Thu, 7 May 2015 15:33:32 +1000 |
From: Alexey Kardashevskiy <address@hidden>
This gets rid of a magic constant describing the default DMA window size
for an emulated PHB.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
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 a69d908..312f0d9 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -893,11 +893,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 895d273..d7b521d 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -114,6 +114,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.1.0
- [Qemu-ppc] [PATCH 00/33] Accumulated -machine pseries patches 2015-05-07, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 02/33] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 03/33] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 05/33] spapr_vio: Introduce a liobn number generating macros, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 07/33] spapr_iommu: Add separate trace points for PCI DMA operations, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 04/33] spapr_pci: Introduce a liobn number generating macros, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 06/33] spapr_pci: Define default DMA window size as a macro,
David Gibson <=
- [Qemu-ppc] [PATCH 01/33] spapr_pci: Fix unsafe signed/unsigned comparisons, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 09/33] spapr_iommu: Make spapr_tce_find_by_liobn() public, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 14/33] hw/ppc/spapr: Fix error message when firmware could not be loaded, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 10/33] spapr_pci: Rework device-tree rendering, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 13/33] pseries: Add pseries-2.4 machine type, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 11/33] spapr_iommu: Give unique QOM name to TCE table, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 08/33] spapr_pci: Make find_phb()/find_dev() public, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 15/33] hw/ppc/spapr: Use error_report() instead of hw_error(), David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 32/33] spapr: override default ram size to 512MB, David Gibson, 2015/05/07
- [Qemu-ppc] [PATCH 12/33] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn, David Gibson, 2015/05/07