qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] About AddressSpace in intel-iommu emulation
@ 2014-06-26 14:01 Le Tan
  2014-06-26 14:05 ` Paolo Bonzini
  0 siblings, 1 reply; 8+ messages in thread
From: Le Tan @ 2014-06-26 14:01 UTC (permalink / raw)
  To: pbonzini; +Cc: Jan Kiszka, qemu-devel

Hi Paolo,
I am adding intel-iommu emulation to q35 for the GSoC project. I am
confused about AddressSpace and I believe that you can help me. :)
1. For intel-iommu emulation, I have to read the translation
structures from guest memory, that is, the guest will prepare some
tables in memory and write the physical address of them to a register
of intel-iommu, and I need to access those structures. I use
dma_memory_read(&address_space_memory,...) to do this. Is that right?
I am not sure that whether accesses to address_space_memory will be
translated through IOMMU. I think the answer is not, because I see
that cpu_physical_memory_read() also use address_space_memory as
AddressSpace.

2. In my opinion, I have to init a AddressSpace and link it with my
IOMMU MemoryRegion, then the bus uses this AddressSpace to translate
the accesses. Is that right? For q35, how can I register my IOMMU
MemoryRegion to the bus? I see that there is function
pci_setup_iommu() that links a AddressSpace to the bus to translate
accesses to PCI into system memory. Is that related? I think q35
should maintain a bus AddressSpace, but I can't find it.
What do you think?

Thanks very much!

Regards,
Le Tan

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

end of thread, other threads:[~2014-06-27 14:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26 14:01 [Qemu-devel] About AddressSpace in intel-iommu emulation Le Tan
2014-06-26 14:05 ` Paolo Bonzini
2014-06-26 14:16   ` Le Tan
2014-06-27  2:08   ` Le Tan
2014-06-27  4:55     ` Paolo Bonzini
2014-06-27  5:46       ` Le Tan
2014-06-27  9:55         ` Jan Kiszka
2014-06-27 14:15           ` Le Tan

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