[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [0/12] Preliminary work for IOMMU emulation support (v2
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] [0/12] Preliminary work for IOMMU emulation support (v2) |
Date: |
Sun, 30 Oct 2011 18:20:46 +0100 |
On 14.10.2011, at 11:20, David Gibson wrote:
> A while back, Eduard - Gabriel Munteanu send a series of patches
> implementing support for emulating the AMD IOMMU in conjunction with
> qemu emulated PCI devices. A revised patch series added support for
> the Intel IOMMU, and I also send a revised version of this series
> which added support for the hypervisor mediated IOMMU on the pseries
> machine.
>
> Richard Henderson also weighed in on the discussion, and there's still
> a cretain amount to be thrashed out in terms of exactly how to set up
> an IOMMU / DMA translation subsystem.
>
> However, really only 2 or 3 patches in any of these series have
> contained anything interesting. The rest of the series has been
> converting existing PCI emulated devices to use the new DMA interface
> which worked through the IOMMU translation, whatever it was. While we
> keep working out what we want for the guts of the IOMMU support, these
> device conversion patches keep bitrotting against updates to the
> various device implementations themselves.
>
> Really, regardless of whether we're actually implementing IOMMU
> translation, it makes sense that qemu code should distinguish between
> when it is really operating in CPU physical addresses and when it is
> operating in bus or DMA addresses which might have some kind of
> translation into physical addresses.
>
> This series, therefore, begins the conversion of existing PCI device
> emulation code to use new (stub) pci dma access functions. These are,
> for now, just defined to be untranslated cpu physical memory accesses,
> as before, but has three advantages:
>
> * It becomes obvious where the code is working with dma addresses,
> so it's easier to grep for what might be affected by an IOMMU or
> other bus address translation.
>
> * The new stubs take the PCIDevice *, from which any of the various
> suggested IOMMU interfaces should be able to locate the correct
> IOMMU translation context.
>
> * The new pci_dma_{read,write}() functions have a return value.
> When we do have IOMMU support, translation failures could lead to
> these functions failing, so we want a way to report it.
>
> This series converts all the easy cases. It doesn't yet handle
> devices which have both PCI and non-PCI variants, such as AHCI, OHCI
> and ne2k. Unlike the earlier version of this series, functions using
> scatter gather _are_ covered, though.
Michael, ping?
Alex
- [Qemu-devel] [PATCH 07/12] lsi53c895a: Use PCI DMA stub functions, (continued)
- [Qemu-devel] [PATCH 07/12] lsi53c895a: Use PCI DMA stub functions, David Gibson, 2011/10/14
- [Qemu-devel] [PATCH 03/12] eepro100: Use PCI DMA stub functions, David Gibson, 2011/10/14
- [Qemu-devel] [PATCH 06/12] e1000: Use PCI DMA stub functions, David Gibson, 2011/10/14
- [Qemu-devel] [PATCH 12/12] usb-uhci: Use PCI DMA stub functions, David Gibson, 2011/10/14
- [Qemu-devel] [PATCH 02/12] rtl8139: Use PCI DMA stub functions, David Gibson, 2011/10/14
- [Qemu-devel] [PATCH 10/12] PCI IDE: Use PCI DMA stub functions, David Gibson, 2011/10/14
- [Qemu-devel] [PATCH 08/12] pcnet-pci: Use PCI DMA stub functions, David Gibson, 2011/10/14
- [Qemu-devel] [PATCH 11/12] usb-ehci: Use PCI DMA stub functions, David Gibson, 2011/10/14
- [Qemu-devel] [PATCH 09/12] intel-hda: Use PCI DMA stub functions, David Gibson, 2011/10/14
- Re: [Qemu-devel] [0/12] Preliminary work for IOMMU emulation support (v2), David Gibson, 2011/10/14
- Re: [Qemu-devel] [0/12] Preliminary work for IOMMU emulation support (v2),
Alexander Graf <=