From: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: agraf@suse.de, aliguori@us.ibm.com, qemu-devel@nongnu.org,
joerg.roedel@amd.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [0/10] Preliminary work for IOMMU emulation support; the easy bits
Date: Thu, 1 Sep 2011 14:33:41 +0300 [thread overview]
Message-ID: <20110901113341.GB3071@localhost> (raw)
In-Reply-To: <1314853263-2086-1-git-send-email-david@gibson.dropbear.id.au>
On Thu, Sep 01, 2011 at 03:00:53PM +1000, 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 fair bit 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.
Hi,
This sounds like a good idea. We should be able to agree on these bits,
at least, and get them merged.
> 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 two 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.
>
> This series only converts the easy cases so far. That is simple
> direct DMA access from device code:
> cpu_physical_memory_{read,write}(), ld*_phys() and st*_phys(). It
> doesn't handle devices which use the scatter/gather code (just ide and
> UHCI, so far). I plan to address that later, but I have some details
> still to work out.
I think AHCI belongs on that list too, my patches didn't handle it
either.
Somewhere down the road we could try to poison the old cpu_*
interfaces, as suggested by others before.
> Anthony, please apply.
It's nice to see this topic got revived. I'll try to post my latest
SeaBIOS patches these days. The reason I didn't last time was I didn't
get much review/acks/naks on the IOMMU patches from core devs. Hopefully
things will go smoother this time.
Cheers,
Eduard
next prev parent reply other threads:[~2011-09-01 11:33 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-01 5:00 [Qemu-devel] [0/10] Preliminary work for IOMMU emulation support; the easy bits David Gibson
2011-09-01 5:00 ` [Qemu-devel] [PATCH 01/10] Add stub functions for PCI device models to do PCI DMA David Gibson
2011-09-01 15:35 ` Michael S. Tsirkin
2011-09-02 0:39 ` David Gibson
2011-09-02 4:38 ` David Gibson
2011-09-05 7:55 ` Michael S. Tsirkin
2011-09-01 15:55 ` Anthony Liguori
2011-09-01 16:03 ` Avi Kivity
2011-09-01 16:05 ` Anthony Liguori
2011-09-01 16:11 ` Avi Kivity
2011-09-01 16:32 ` Anthony Liguori
2011-09-02 8:35 ` Avi Kivity
2011-09-03 12:25 ` Blue Swirl
2011-09-02 0:38 ` David Gibson
2011-09-02 8:37 ` Avi Kivity
2011-09-03 3:04 ` Eduard - Gabriel Munteanu
2011-09-02 4:40 ` David Gibson
2011-09-03 1:16 ` Richard Henderson
2011-09-23 16:37 ` Anthony Liguori
2011-09-01 5:00 ` [Qemu-devel] [PATCH 02/10] rtl8139: Use PCI DMA stub functions David Gibson
2011-09-01 5:00 ` [Qemu-devel] [PATCH 03/10] eepro100: " David Gibson
2011-09-01 5:00 ` [Qemu-devel] [PATCH 04/10] ac97: " David Gibson
2011-09-01 5:00 ` [Qemu-devel] [PATCH 05/10] es1370: " David Gibson
2011-09-01 5:00 ` [Qemu-devel] [PATCH 06/10] e1000: " David Gibson
2011-09-01 5:01 ` [Qemu-devel] [PATCH 07/10] lsi53c895a: " David Gibson
2011-09-01 5:01 ` [Qemu-devel] [PATCH 08/10] pcnet-pci: " David Gibson
2011-09-01 5:01 ` [Qemu-devel] [PATCH 09/10] usb-ohci: " David Gibson
2011-09-01 10:10 ` Gerd Hoffmann
2011-09-02 1:47 ` David Gibson
2011-09-01 5:01 ` [Qemu-devel] [PATCH 10/10] intel-hda: " David Gibson
2011-09-01 10:16 ` Gerd Hoffmann
2011-09-02 1:42 ` David Gibson
2011-09-01 11:33 ` Eduard - Gabriel Munteanu [this message]
2011-09-02 0:36 ` [Qemu-devel] [0/10] Preliminary work for IOMMU emulation support; the easy bits David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110901113341.GB3071@localhost \
--to=eduard.munteanu@linux360.ro \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=joerg.roedel@amd.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.