aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-10-23 13:09:09 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-10-23 13:09:09 +0100
commit147482ae35b896808af68c0051ad86d3aae12979 (patch)
tree6fbf9ac9ac7693aade5e6fb9604e2eeccccba61c /include/hw
parent431429a5b802fccf2701c37f580307c6979f4c3e (diff)
parent659f7f65561e78d720986d61f3112c54a97b2b96 (diff)
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-next-20151023' into staging
ppc patch queue - 2015-10-23 sPAPR highlights: * Allow VFIO devices on the spapr-pci-host-bridge * Allow virtio VGA * Safer handling of HTAB allocation * ibm,pa-features device tree property non-sPAPR highlights: * Categorization of many ppc specific devices in help output * Tweaks to MMU type constants # gpg: Signature made Fri 23 Oct 2015 07:27:56 BST using RSA key ID 20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-next-20151023: (21 commits) prep: do not use CPU_LOG_IOPORT, convert to tracepoints openpic: add to misc category macio-nvram: add to misc category macio: add to bridge category uninorth: add to bridge category macio-ide: add to storage category cuda: add to bridge category grackle: add to bridge category escc: add to input category cmd646: add to storage category adb: add to input category ppc/spapr: Add "ibm,pa-features" property to the device-tree ppc: Add mmu_model defines for arch 2.03 and 2.07 hw/scsi/spapr_vscsi: Remove superfluous memset spapr_pci: Allow VFIO devices to work on the normal PCI host bridge spapr_iommu: Provide a function to switch a TCE table to allowing VFIO spapr_iommu: Rename vfio_accel parameter spapr_pci: Allow PCI host bridge DMA window to be configured spapr: Add "slb-size" property to CPU device tree nodes spapr: Abort when HTAB of requested size isn't allocated ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/pci-host/spapr.h3
-rw-r--r--include/hw/ppc/spapr.h6
2 files changed, 5 insertions, 4 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());
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 56c5b0b2b8..5baa90683b 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -563,7 +563,7 @@ struct sPAPRTCETable {
uint32_t page_shift;
uint64_t *table;
bool bypass;
- bool vfio_accel;
+ bool need_vfio;
int fd;
MemoryRegion iommu;
struct VIOsPAPRDevice *vdev; /* for @bypass migration compatibility only */
@@ -588,7 +588,9 @@ sPAPRTCETable *spapr_tce_new_table(DeviceState *owner, uint32_t liobn,
uint64_t bus_offset,
uint32_t page_shift,
uint32_t nb_table,
- bool vfio_accel);
+ bool need_vfio);
+void spapr_tce_set_need_vfio(sPAPRTCETable *tcet, bool need_vfio);
+
MemoryRegion *spapr_tce_get_iommu(sPAPRTCETable *tcet);
int spapr_dma_dt(void *fdt, int node_off, const char *propname,
uint32_t liobn, uint64_t window, uint32_t size);