[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/40] spapr_pci: Define default DMA window size as a
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PULL 09/40] spapr_pci: Define default DMA window size as a macro |
Date: |
Wed, 3 Jun 2015 23:45:10 +0200 |
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>
Signed-off-by: Alexander Graf <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);
--
1.8.1.4
- [Qemu-devel] [PULL 31/40] pci: make pci_bar useable outside pci.c, (continued)
- [Qemu-devel] [PULL 31/40] pci: make pci_bar useable outside pci.c, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 05/40] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 33/40] spapr_pci: emit hotplug add/remove events during hotplug, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 04/40] spapr_pci: Fix unsafe signed/unsigned comparisons, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 30/40] spapr_pci: create DRConnectors for each PCI slot during PHB realize, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 15/40] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 24/40] spapr: add rtas_st_buffer_direct() helper, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 12/40] spapr_iommu: Make spapr_tce_find_by_liobn() public, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 08/40] spapr_vio: Introduce a liobn number generating macros, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 06/40] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 09/40] spapr_pci: Define default DMA window size as a macro,
Alexander Graf <=
- [Qemu-devel] [PULL 07/40] spapr_pci: Introduce a liobn number generating macros, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 18/40] hw/ppc/spapr: Use error_report() instead of hw_error(), Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 14/40] spapr_iommu: Give unique QOM name to TCE table, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 16/40] pseries: Add pseries-2.4 machine type, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 13/40] spapr_pci: Rework device-tree rendering, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 38/40] tci: do not use CPUArchState in tcg-target.h, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 37/40] Add David Gibson for sPAPR in MAINTAINERS file, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 35/40] spapr: override default ram size to 512MB, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 29/40] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge, Alexander Graf, 2015/06/03
- [Qemu-devel] [PULL 17/40] hw/ppc/spapr: Fix error message when firmware could not be loaded, Alexander Graf, 2015/06/03