All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v01 0/3] xen/arm: introduce IOMMU driver for OMAP platforms
@ 2014-01-22 15:52 Andrii Tseglytskyi
  2014-01-22 15:52 ` [RFC v01 1/3] arm: omap: introduce iommu module Andrii Tseglytskyi
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Andrii Tseglytskyi @ 2014-01-22 15:52 UTC (permalink / raw)
  To: xen-devel

Hi,

The following patch series is an RFC for possible implementation of simple MMU module,
which is designed to translate IPA to MA for peripheral processors like GPU / IPU
for OMAP platforms. Currently on our OMAP platform (OMAP5 panda) we have 3 external MMUs
which need to be handled properly.

It would be great to get a community feedback - will this be useful for Xen project?

Let me describe an algorithm briefly. It is simple and straightforward.
The following simple logic is used to translate addresses from IPA to MA:

1. During boot time guest domain creates "pagetable" for external MMU IP.
Pagetable is a singletone data structure, which is stored in ususal kernel
heap memory. All memory mappings for corresponding MMU are stored inside it.
Format of "pagetable" is well defined.

2. Guest domain enables peripheral remote processor. As a part of enable sequence
kernel allocates chunks of heap memory needed for remote processor and stores
pointers to allocated chunks in already created "pagetable". After it writes
a physical address of pagetable to MMU configuration register. As result MMU IP
knows about all allocations, and remote processor can use them directly in its
software.

3. Xen omap mmu driver creates a trap for access to MMU configuration registers.
It reads a physical address of "pagetable" from MMU register and creates a copy
of it in own memory. As result - we have two similar configuration data structures -
first - in guest domain kernel, second - in Xen hypervisor.

4. Xen omap mmu driver parses its own copy of pagetable and translate all physical
addresses to corresponding machine addresses using existing p2m API call.
After it writes a physical address  of its pagetable (with already translated PA to MA)
to MMU IP configuration registers and returns control to guest domain.

As a result - guest domain continues enabling remote processor with it MMU and MMU
will use new pagetable, modified by Xen omap mmu driver. New pagetable will be used
directly by MMU IP, and its new structure will be hidden for guest domain kernel,
it won't know anything about p2m translation.

Verified with Xen 4.4-unstable, Linux kernel 3.8 as Dom0, Linux(Android) kernel 3.4 as DomU.
Target platform OMAP5 panda.

Thank you for your attention,

Regards,

Andrii Tseglytskyi (3):
  arm: omap: introduce iommu module
  arm: omap: translate iommu mapping to 4K pages
  arm: omap: cleanup iopte allocations

 xen/arch/arm/Makefile     |    1 +
 xen/arch/arm/io.c         |    1 +
 xen/arch/arm/io.h         |    1 +
 xen/arch/arm/omap_iommu.c |  492 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 495 insertions(+)
 create mode 100644 xen/arch/arm/omap_iommu.c

-- 
1.7.9.5

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

end of thread, other threads:[~2014-01-24 13:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 15:52 [RFC v01 0/3] xen/arm: introduce IOMMU driver for OMAP platforms Andrii Tseglytskyi
2014-01-22 15:52 ` [RFC v01 1/3] arm: omap: introduce iommu module Andrii Tseglytskyi
2014-01-23 14:39   ` Stefano Stabellini
2014-01-24 11:05     ` Andrii Tseglytskyi
2014-01-24 11:49       ` Stefano Stabellini
2014-01-24 12:04         ` Andrii Tseglytskyi
2014-01-23 15:31   ` Julien Grall
2014-01-24 11:49     ` Andrii Tseglytskyi
2014-01-24 13:31       ` Julien Grall
2014-01-22 15:52 ` [RFC v01 2/3] arm: omap: translate iommu mapping to 4K pages Andrii Tseglytskyi
2014-01-23 14:52   ` Stefano Stabellini
2014-01-24 10:37     ` Andrii Tseglytskyi
2014-01-22 15:52 ` [RFC v01 3/3] arm: omap: cleanup iopte allocations Andrii Tseglytskyi
2014-01-22 16:56 ` [RFC v01 0/3] xen/arm: introduce IOMMU driver for OMAP platforms Stefano Stabellini
2014-01-22 17:39   ` Stefano Stabellini
2014-01-22 20:47     ` Andrii Tseglytskyi
2014-01-22 20:52     ` Andrii Tseglytskyi

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.