diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2015-09-24 09:56:44 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2015-10-23 10:38:10 +1100 |
commit | f93caaac36ec3b030184055596cb56f64d0de988 (patch) | |
tree | 400cea0118975035cfe932fd8c6a5812e6b1c78e /include/hw/pci-host/spapr.h | |
parent | fd5da5c47264a57c7d01507eaf50bf3d288ba8a4 (diff) |
spapr_pci: Allow PCI host bridge DMA window to be configured
At present the PCI host bridge (PHB) for the pseries machine type has a
fixed DMA window from 0..1GB (in PCI address space) which is mapped to real
memory via the PAPR paravirtualized IOMMU.
For better support of VFIO devices, we're going to want to allow for
different configurations of the DMA window.
Eventually we'll want to allow the guest itself to reconfigure the window
via the PAPR dynamic DMA window interface, but as a preliminary this patch
allows the user to reconfigure the window with new properties on the PHB
device.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Diffstat (limited to 'include/hw/pci-host/spapr.h')
-rw-r--r-- | include/hw/pci-host/spapr.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h index 5322b560eb..7de5e029b1 100644 --- a/include/hw/pci-host/spapr.h +++ b/include/hw/pci-host/spapr.h @@ -78,6 +78,7 @@ struct sPAPRPHBState { MemoryRegion memwindow, iowindow, msiwindow; uint32_t dma_liobn; + hwaddr dma_win_addr, dma_win_size; AddressSpace iommu_as; MemoryRegion iommu_root; @@ -115,8 +116,6 @@ 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) { sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine()); |