qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Newbie:  How to implement iommu?
@ 2009-04-06 15:51 Brian Wheeler
  2009-04-06 17:41 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Wheeler @ 2009-04-06 15:51 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-06 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-06 15:51 [Qemu-devel] Newbie: How to implement iommu? Brian Wheeler
2009-04-06 17:41 ` Avi Kivity

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).