dma: eliminate DMAContext
The DMAContext is a simple pointer to an AddressSpace that is now alwaysalready available. Make everyone hold the address space directly,and clean up the DMA API to use the AddressSpace directly.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
spapr_vio: take care of creating our own AddressSpace/DMAContext
Fetch the root region from the sPAPRTCETable, and use it to buildan AddressSpace and DMAContext.
Now, everywhere we have a DMAContext we also have access to thecorresponding AddressSpace (either because we create it just before...
memory: iommu support
Add a new memory region type that translates addresses it is given,then forwards them to a target address space. This is similar toan alias, except that the mapping is more flexible than a lineartranslation and trucation, and also less efficient since the...
memory: Add iommu map/unmap notifiers
This patch adds a NotifierList to MemoryRegions which represent IOMMUsallowing other parts of the code to register interest in mappings orunmappings from the IOMMU. All IOMMU implementations will need to callmemory_region_notify_iommu() to inform those waiting on the notifier list,...
vfio: abort if an emulated iommu is used
vfio doesn't support guest iommus yet, indicate it to the userby gently depositing a core on their disk.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Avi Kivity <avi.kivity@gmail.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
spapr: convert TCE API to use an opaque type
The TCE table is currently returned as a DMAContext, and non-type-safeAPIs are called later passing back the DMAContext. Since we want to moveaway from DMAContext, use an opaque type instead, and add an accessor...
spapr: make IOMMU translation go through IOMMUTLBEntry
The next step is to introduce the translation code that will be used forIOMMU MemoryRegions, but still do the actual translation in a DMAContext.
Acked-by: David Gibson <david@gibson.dropbear.id.au>...
spapr: use memory core for iommu support
Now we can stop using a "translating" DMAContext, but we do not yet modifythe sPAPRTCETable users to get an AddressSpace; they keep using the tablevia a DMAContext.
dma: eliminate old-style IOMMU support
The translate function in the DMAContext is now always NULL.Remove every reference to it.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
pci: use memory core for iommu support
Use the new iommu support in the memory core for iommu support. The onlyuser, spapr, is also converted, but it still provides a DMAContextinterface until the non-PCI bits switch to AddressSpace.
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>...
View all revisions | View revisions
Also available in: Atom