All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/9] "Non-shared" IOMMU support on ARM
@ 2017-03-15 20:05 Oleksandr Tyshchenko
  2017-03-15 20:05 ` [RFC PATCH 1/9] xen/device-tree: Add dt_count_phandle_with_args helper Oleksandr Tyshchenko
                   ` (9 more replies)
  0 siblings, 10 replies; 56+ messages in thread
From: Oleksandr Tyshchenko @ 2017-03-15 20:05 UTC (permalink / raw)
  To: xen-devel
  Cc: sstabellini, vlad.babchuk, al1img, andrii.anisov, olekstysh,
	andr2000, julien.grall, JBeulich, joculator

Hi, all.

The purpose of this patch series is to create a base for porting
any "Non-shared" IOMMUs to Xen on ARM. Saying "Non-shared" IOMMU I mean
the IOMMU that can't share the page table with the CPU.
Primarily, we are interested in IPMMU-VMSA and I hope that it will be the first candidate.
It is VMSA-compatible IOMMU that integrated in the newest Renesas R-Car Gen3 SoCs (ARM).
And this IOMMU can't share the page table with the CPU since it uses
stage-1 page table unlike the CPU that uses stage-2 therefore I name it
"Non-shared" IOMMU.

I have already raised disscusion [2] about some generic problems I had faced
during porting IPMMU-VMSA Linux driver to Xen. And on this basis I made
patches you can see it in this request. Only the first patch is not related to 
IOMMU. But, I decided to ship it with the current request since it is a generic change
which we will need in a moment.

The reason for this patch series to be RFC is that I still have some doubts about generic code I touched.
I hope that I haven't broken anything for x86, but confirmation is needed.

I didn't include IPMMU-VMSA driver in this request. Although, I am still in progress, I want to say
that passthrough use-cases (actually what this all are firstly needed for) work for me with some limitations.
I tested on Salvator-X board (R-Car H3) with the next devices that have DMA IPs
connected to IPMMU uTLBs (using current master branch):
1. AUDMA is assigned to dom0 (protected by IOMMU)
2. SDHC0 is assigned to dom1 (passthrough to domain)
3. SDHC3 is assigned to dom2 (passthrough to domain)

During porting IPMMU-VMSA driver to Xen I was trying to be as close as possible to Linux [1]. But,
it was a little bit difficult). It would be really nice to have some feedback and get your feeling regarding this driver.
I am also interested in if I took the right direction or there are some other ideas on doing the same.
So, is it a right direction to move on?

You can find IPMMU-VMSA driver here.
repo: https://github.com/otyshchenko1/xen.git branch: ipmmu_ml
or
https://github.com/otyshchenko1/xen/commits/ipmmu_ml
It is located on top of "Unshared" IOMMU patch series and consist of 6 patches.

Thank you.

[1] Question about porting IPMMU-VMSA Linux driver to XEN
https://lists.xenproject.org/archives/html/xen-devel/2016-12/msg00992.html
[2] Unshared IOMMU issues 
https://lists.xenproject.org/archives/html/xen-devel/2017-02/msg01781.html

Oleksandr Tyshchenko (9):
  xen/device-tree: Add dt_count_phandle_with_args helper
  iommu: Add ability to map/unmap the number of pages
  xen/arm: p2m: Add helper to convert p2m type to IOMMU flags
  xen/arm: p2m: Update IOMMU mapping whenever possible if page table is
    not shared
  iommu/arm: Re-define iommu_use_hap_pt(d) as iommu_hap_pt_share
  iommu: Pass additional use_iommu argument to iommu_domain_init()
  iommu/arm: Add alloc_page_table platform callback
  iommu: Split iommu_hwdom_init() into arch specific parts
  xen: Add use_iommu flag to createdomain domctl

 tools/libxl/libxl_create.c          |  5 ++
 xen/arch/arm/domain.c               |  4 +-
 xen/arch/arm/p2m.c                  | 40 +++++++++++++++-
 xen/arch/x86/domain.c               |  4 +-
 xen/common/device_tree.c            |  7 +++
 xen/common/domctl.c                 |  5 +-
 xen/drivers/passthrough/arm/iommu.c | 12 ++++-
 xen/drivers/passthrough/arm/smmu.c  |  3 ++
 xen/drivers/passthrough/iommu.c     | 91 ++++++++++++++++++++-----------------
 xen/drivers/passthrough/x86/iommu.c | 36 +++++++++++++++
 xen/include/asm-arm/iommu.h         |  7 ++-
 xen/include/asm-arm/p2m.h           | 34 ++++++++++++++
 xen/include/public/domctl.h         |  3 ++
 xen/include/xen/device_tree.h       | 19 ++++++++
 xen/include/xen/iommu.h             | 20 ++++++--
 xen/include/xen/sched.h             |  3 ++
 16 files changed, 239 insertions(+), 54 deletions(-)

-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2017-04-28 10:44 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 20:05 [RFC PATCH 0/9] "Non-shared" IOMMU support on ARM Oleksandr Tyshchenko
2017-03-15 20:05 ` [RFC PATCH 1/9] xen/device-tree: Add dt_count_phandle_with_args helper Oleksandr Tyshchenko
2017-03-16 15:39   ` Julien Grall
2017-03-17 11:24     ` Oleksandr Tyshchenko
2017-03-15 20:05 ` [RFC PATCH 2/9] iommu: Add ability to map/unmap the number of pages Oleksandr Tyshchenko
2017-03-22 15:44   ` Jan Beulich
2017-03-22 18:01     ` Oleksandr Tyshchenko
2017-03-23  9:07       ` Jan Beulich
2017-03-23 12:47         ` Oleksandr Tyshchenko
2017-04-27 16:56           ` Oleksandr Tyshchenko
2017-04-28  6:23             ` Jan Beulich
2017-04-28 10:16               ` Oleksandr Tyshchenko
2017-04-28 10:29                 ` Jan Beulich
2017-04-28 10:44                   ` Oleksandr Tyshchenko
2017-04-19 17:31   ` Julien Grall
2017-04-21 11:46     ` Oleksandr Tyshchenko
2017-03-15 20:05 ` [RFC PATCH 3/9] xen/arm: p2m: Add helper to convert p2m type to IOMMU flags Oleksandr Tyshchenko
2017-04-19 17:28   ` Julien Grall
2017-04-21 11:47     ` Oleksandr Tyshchenko
2017-03-15 20:05 ` [RFC PATCH 4/9] xen/arm: p2m: Update IOMMU mapping whenever possible if page table is not shared Oleksandr Tyshchenko
2017-04-19 17:46   ` Julien Grall
2017-04-21 14:18     ` Oleksandr Tyshchenko
2017-04-21 16:27       ` Julien Grall
2017-04-21 18:44         ` Oleksandr Tyshchenko
2017-04-24 11:41           ` Julien Grall
2017-04-24 16:08             ` Oleksandr Tyshchenko
2017-03-15 20:05 ` [RFC PATCH 5/9] iommu/arm: Re-define iommu_use_hap_pt(d) as iommu_hap_pt_share Oleksandr Tyshchenko
2017-03-15 20:05 ` [RFC PATCH 6/9] iommu: Pass additional use_iommu argument to iommu_domain_init() Oleksandr Tyshchenko
2017-03-22 15:48   ` Jan Beulich
2017-03-23 12:50     ` Oleksandr Tyshchenko
2017-03-15 20:05 ` [RFC PATCH 7/9] iommu/arm: Add alloc_page_table platform callback Oleksandr Tyshchenko
2017-03-22 15:49   ` Jan Beulich
2017-03-23 12:57     ` Oleksandr Tyshchenko
2017-03-15 20:05 ` [RFC PATCH 8/9] iommu: Split iommu_hwdom_init() into arch specific parts Oleksandr Tyshchenko
2017-03-22 15:54   ` Jan Beulich
2017-03-22 18:40     ` Oleksandr Tyshchenko
2017-03-23  9:08       ` Jan Beulich
2017-03-23 12:40         ` Oleksandr Tyshchenko
2017-03-23 13:28           ` Jan Beulich
2017-04-19 18:09           ` Julien Grall
2017-04-21 12:18             ` Oleksandr Tyshchenko
2017-03-15 20:05 ` [RFC PATCH 9/9] xen: Add use_iommu flag to createdomain domctl Oleksandr Tyshchenko
2017-03-22 15:56   ` Jan Beulich
2017-03-23 16:36     ` Oleksandr Tyshchenko
2017-03-23 17:05       ` Jan Beulich
2017-03-24 11:19         ` Oleksandr Tyshchenko
2017-03-24 11:38           ` Jan Beulich
2017-03-24 13:05             ` Oleksandr Tyshchenko
2017-04-19 18:26   ` Julien Grall
2017-04-21 14:41     ` Oleksandr Tyshchenko
2017-04-25 15:23     ` Wei Liu
2017-04-25 16:07       ` Oleksandr Tyshchenko
2017-04-26 10:05         ` Ian Jackson
2017-04-27 10:41           ` Oleksandr Tyshchenko
2017-03-16 15:31 ` [RFC PATCH 0/9] "Non-shared" IOMMU support on ARM Julien Grall
2017-03-17 11:24   ` Oleksandr Tyshchenko

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.