qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Brian Wheeler <bdwheele@indiana.edu>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Newbie:  How to implement iommu?
Date: Mon, 06 Apr 2009 11:51:30 -0400	[thread overview]
Message-ID: <1239033090.1975.78.camel@nibbler.dlib.indiana.edu> (raw)

I've been going through the source (and the list archives) and I must be
missing something obvious.  

I need to translate an address passed to
cpu_physical_memory_{read,write} via an IOMMU.  I've been told there's a
dma api, but I cannot find any documentation about it, nor can I find an
obvious user of it.

How do I hook into the read/write address translation?  I can see that
the iommu is setup correctly:

typhoon pchip0 read  reg=1, val=0000000080000001
typhoon pchip0 read  reg=5, val=000000003ff00000
typhoon pchip0 read  reg=9, val=0000000000000000

(which basically translates any 32-bit address beginning with 0x80000000
to 0x00000000)

and later in the emulation I'm seeing a bunch of readl messages

Unassigned mem readl 0000000086246ffc

which should have really been looking at physical address 0x6246ffc


So how do I catch cpu_physical_memory_{read,write} calls and put my
address translation in there?


Thanks!
Brian

             reply	other threads:[~2009-04-06 15:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 15:51 Brian Wheeler [this message]
2009-04-06 17:41 ` [Qemu-devel] Newbie: How to implement iommu? Avi Kivity

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=1239033090.1975.78.camel@nibbler.dlib.indiana.edu \
    --to=bdwheele@indiana.edu \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).