All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Tyshchenko <olekstysh@gmail.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Subject: Re: [PATCH v2 00/13] "Non-shared" IOMMU support on ARM
Date: Tue, 1 Aug 2017 14:08:20 +0300	[thread overview]
Message-ID: <CAPD2p-=6pyWeE5VsDbP7roJx1nG-Fw3U5ZVfxCMu5e4pmFg0rg@mail.gmail.com> (raw)
In-Reply-To: <AADFC41AFE54684AB9EE6CBC0274A5D190D518D0@SHSMSX101.ccr.corp.intel.com>

Hi, Kevin

On Tue, Aug 1, 2017 at 6:06 AM, Tian, Kevin <kevin.tian@intel.com> wrote:
>> From: Oleksandr Tyshchenko [mailto:olekstysh@gmail.com]
>> Sent: Monday, July 31, 2017 7:58 PM
>>
>> Hi, Kevin
>>
>> On Mon, Jul 31, 2017 at 8:57 AM, Tian, Kevin <kevin.tian@intel.com> wrote:
>> >> From: Oleksandr Tyshchenko
>> >> Sent: Wednesday, July 26, 2017 1:27 AM
>> >>
>> >> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>> >>
>> >> 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.
>> >
>> > Is "non-shared" IOMMU a standard terminology in ARM side? I quickly
>> > searched to find it mostly used in this thread...
>> I don't think that it is a standard terminology.
>>
>> >
>> > On the other hand, all IOMMUs support a basic DMA remapping
>> > mechanism with page table not shared with CPU. Then some IOMMUs
>> > may optional support Shared Virtual Memory (SVM) through page
>> > sharing with CPU. Then I'm not sure why need to highlight the
>> > "non-shared" manner in this thread, instead of just saying
>> > IPMMU-VMSA support...
>> I wouldn't use "IPMMU-VMSA support" in this thread since it may be any
>> other IOMMUs which can't share page table
>> with CPU because of format incompatibilities.
>
> As I commented you can assume all IOMMUs cannot share page
> table with CPU as the starting point. It's not good to name an IOMMU
> driver based on such fact.
>
>> I needed something short to describe such IOMMUs, but, If title
>> "non-shared" IOMMU sounds confusing
>> I won't use it anymore. Do you have something in mind?
>
> IOMMU driver needs to be vendor specific. Is your driver working
> for all IPMMU-VMSA compatible IOMMUs or only for Renesas?
> If the latter, you may make the name explicit for such purpose.
>
> btw since you're porting Linux driver to Xen. What 's the name
> used in Linux side? that should be a good reference to you.

I am afraid a misunderstanding took place. Let me elaborate a bit more
about this.

The IOMMU driver I am porting to Xen is IPMMU-VMSA [1]. This name is
used in Linux
and this name was retained during porting to Xen. This driver is
intended to work with Renesas VMSA-compatible IPMMUs.
But, IPMMU-VMSA support is not a target for the current thread, there
is another thread for adding it [2].

The purpose of the current thread is to create ground for IPMMU-VMSA IOMMUs
(as well as other IOMMUs which can't share page table with CPU because
of format incompatibilities) to be functional inside Xen on ARM.
The only IOMMU supported today in Xen on ARM is the ARM SMMU (which
uses the same page table format as the CPU and can share page table
with it).
And ARM specific code assumes that P2M table is *always* shared and
acts accordingly. So, this patch series is trying
to, let's say, brake this assumption and create environment to handle
such IOMMUs as well.
So, I may use the whole sentence as a patch series title in order not
to confuse people:
"Support IOMMUs which don't share page table with the CPU on ARM"
No objections?

P.S. This patch series also touches x86 specific code, it's because I
had to modify common code.

[1] http://elixir.free-electrons.com/linux/latest/source/drivers/iommu/ipmmu-vmsa.c
[2] https://lists.xen.org/archives/html/xen-devel/2017-07/msg02679.html

>
>>
>> >
>> >> 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).
>> >> I am about to push IPMMU-VMSA support in a while.
>> >>
>> >> With regard to the patch series, it was rebased on Xen 4.9.0 release and
>> >> tested on Renesas R-Car Gen3
>> >> H3/M3 based boards with applied IPMMU-VMSA support:
>> >> - Patches 1 and 3 have Julien's Rb.
>> >> - Patch 2 has Jan's Rb but only for x86 and generic parts.
>> >> - Patch 4 has Julien's Ab.
>> >> - Patches 5,6,9,10 were slightly reworked.
>> >> - Patch 7 was significantly reworked. The previous patch -> iommu: Split
>> >> iommu_hwdom_init() into arch specific parts
>> >> - Patches 8,11,12,13 are new.
>> >>
>> >> Not really sure about x86-related changes since I had no possibility to
>> check.
>> >> So, compile-tested on x86.
>> >>
>> >> You can find current patch series here:
>> >> repo: https://github.com/otyshchenko1/xen.git branch:
>> >> non_shared_iommu_v2
>> >>
>> >> Previous patch series here:
>> >> [PATCH v1 00/10] "Non-shared" IOMMU support on ARM
>> >> https://www.mail-archive.com/xen-devel@lists.xen.org/msg107532.html
>> >>
>> >> [RFC PATCH 0/9] "Non-shared" IOMMU support on ARM
>> >> https://www.mail-archive.com/xen-devel@lists.xen.org/msg100468.html
>> >>
>> >> Thank you.
>> >>
>> >> Oleksandr Tyshchenko (13):
>> >>   xen/device-tree: Add dt_count_phandle_with_args helper
>> >>   iommu: Add extra order argument to the IOMMU APIs and platform
>> >>     callbacks
>> >>   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: Add extra use_iommu argument to iommu_domain_init()
>> >>   iommu: Make decision about needing IOMMU for hardware domains in
>> >>     advance
>> >>   iommu/arm: Misc fixes for arch specific part
>> >>   xen/arm: Add use_iommu flag to xen_arch_domainconfig
>> >>   xen/arm: domain_build: Don't expose IOMMU specific properties to the
>> >>     guest
>> >>   iommu/arm: smmu: Squash map_pages/unmap_pages with
>> >> map_page/unmap_page
>> >>   [RFC] iommu: VT-d: Squash map_pages/unmap_pages with
>> >>     map_page/unmap_page
>> >>   [RFC] iommu: AMD-Vi: Squash map_pages/unmap_pages with
>> >>     map_page/unmap_page
>> >>
>> >>  tools/libxl/libxl_arm.c                       |   8 +
>> >>  xen/arch/arm/domain.c                         |   2 +-
>> >>  xen/arch/arm/domain_build.c                   |  10 ++
>> >>  xen/arch/arm/p2m.c                            |  10 +-
>> >>  xen/arch/x86/domain.c                         |   2 +-
>> >>  xen/arch/x86/mm.c                             |  11 +-
>> >>  xen/arch/x86/mm/p2m-ept.c                     |  21 +--
>> >>  xen/arch/x86/mm/p2m-pt.c                      |  26 +---
>> >>  xen/arch/x86/mm/p2m.c                         |  38 +----
>> >>  xen/arch/x86/x86_64/mm.c                      |   5 +-
>> >>  xen/common/device_tree.c                      |   7 +
>> >>  xen/common/grant_table.c                      |  10 +-
>> >>  xen/drivers/passthrough/amd/iommu_map.c       | 212
>> +++++++++++++++----
>> >> -------
>> >>  xen/drivers/passthrough/amd/pci_amd_iommu.c   |  10 +-
>> >>  xen/drivers/passthrough/arm/iommu.c           |   7 +-
>> >>  xen/drivers/passthrough/arm/smmu.c            |  23 ++-
>> >>  xen/drivers/passthrough/iommu.c               |  73 ++++-----
>> >>  xen/drivers/passthrough/vtd/iommu.c           | 116 +++++++++-----
>> >>  xen/drivers/passthrough/vtd/x86/vtd.c         |   4 +-
>> >>  xen/drivers/passthrough/x86/iommu.c           |   6 +-
>> >>  xen/include/asm-arm/iommu.h                   |   4 +-
>> >>  xen/include/asm-arm/p2m.h                     |  34 +++++
>> >>  xen/include/asm-x86/hvm/svm/amd-iommu-proto.h |   8 +-
>> >>  xen/include/public/arch-arm.h                 |   5 +
>> >>  xen/include/xen/device_tree.h                 |  19 +++
>> >>  xen/include/xen/iommu.h                       |  24 +--
>> >>  26 files changed, 402 insertions(+), 293 deletions(-)
>> >>
>> >> --
>> >> 2.7.4
>> >>
>> >>
>> >> _______________________________________________
>> >> Xen-devel mailing list
>> >> Xen-devel@lists.xen.org
>> >> https://lists.xen.org/xen-devel
>>
>>
>>
>> --
>> Regards,
>>
>> Oleksandr Tyshchenko



-- 
Regards,

Oleksandr Tyshchenko

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

  reply	other threads:[~2017-08-01 11:08 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 17:26 [PATCH v2 00/13] "Non-shared" IOMMU support on ARM Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 01/13] xen/device-tree: Add dt_count_phandle_with_args helper Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 02/13] iommu: Add extra order argument to the IOMMU APIs and platform callbacks Oleksandr Tyshchenko
2017-08-03 11:21   ` Julien Grall
2017-08-03 12:32     ` Oleksandr Tyshchenko
2017-08-21 16:20       ` Oleksandr Tyshchenko
2017-08-22  7:21         ` Jan Beulich
2017-08-22 10:28           ` Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 03/13] xen/arm: p2m: Add helper to convert p2m type to IOMMU flags Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 04/13] xen/arm: p2m: Update IOMMU mapping whenever possible if page table is not shared Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 05/13] iommu/arm: Re-define iommu_use_hap_pt(d) as iommu_hap_pt_share Oleksandr Tyshchenko
2017-08-03 11:23   ` Julien Grall
2017-08-03 12:33     ` Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 06/13] iommu: Add extra use_iommu argument to iommu_domain_init() Oleksandr Tyshchenko
2017-08-21 16:29   ` Oleksandr Tyshchenko
2017-12-06 16:51   ` Jan Beulich
2017-12-06 19:53     ` Oleksandr Tyshchenko
2017-12-06 22:49       ` Julien Grall
2017-12-07 12:08         ` Oleksandr Tyshchenko
2017-12-07 12:51           ` Jan Beulich
2017-07-25 17:26 ` [PATCH v2 07/13] iommu: Make decision about needing IOMMU for hardware domains in advance Oleksandr Tyshchenko
2017-08-21 16:30   ` Oleksandr Tyshchenko
2017-12-06 17:01   ` Jan Beulich
2017-12-06 19:23     ` Oleksandr Tyshchenko
2017-12-07  8:57       ` Jan Beulich
2017-12-07 13:50         ` Oleksandr Tyshchenko
2017-12-07 13:57           ` Jan Beulich
2017-12-08 12:28             ` Oleksandr Tyshchenko
2018-01-18 12:09   ` Roger Pau Monné
2018-01-18 14:50     ` Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 08/13] iommu/arm: Misc fixes for arch specific part Oleksandr Tyshchenko
2017-08-03 11:31   ` Julien Grall
2017-08-03 12:34     ` Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 09/13] xen/arm: Add use_iommu flag to xen_arch_domainconfig Oleksandr Tyshchenko
2017-07-28 16:16   ` Wei Liu
2017-07-28 16:30     ` Oleksandr Tyshchenko
2017-08-03 11:33   ` Julien Grall
2017-08-03 12:31     ` Oleksandr Tyshchenko
2017-08-03 12:35       ` Julien Grall
2017-07-25 17:26 ` [PATCH v2 10/13] xen/arm: domain_build: Don't expose IOMMU specific properties to the guest Oleksandr Tyshchenko
2017-08-03 11:37   ` Julien Grall
2017-08-03 13:24     ` Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 11/13] iommu/arm: smmu: Squash map_pages/unmap_pages with map_page/unmap_page Oleksandr Tyshchenko
2017-08-03 12:36   ` Julien Grall
2017-08-03 13:26     ` Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 12/13] [RFC] iommu: VT-d: " Oleksandr Tyshchenko
2017-08-21 16:44   ` Oleksandr Tyshchenko
2017-09-12 14:44     ` Oleksandr Tyshchenko
2017-09-20  8:54       ` Tian, Kevin
2017-09-20 18:23         ` Oleksandr Tyshchenko
2017-07-25 17:26 ` [PATCH v2 13/13] [RFC] iommu: AMD-Vi: " Oleksandr Tyshchenko
2017-08-21 16:44   ` Oleksandr Tyshchenko
2017-09-12 14:45     ` Oleksandr Tyshchenko
2017-07-31  5:57 ` [PATCH v2 00/13] "Non-shared" IOMMU support on ARM Tian, Kevin
2017-07-31 11:57   ` Oleksandr Tyshchenko
2017-08-01  3:06     ` Tian, Kevin
2017-08-01 11:08       ` Oleksandr Tyshchenko [this message]
2017-08-02  6:12         ` Tian, Kevin
2017-08-02 17:47           ` Oleksandr Tyshchenko
2017-08-01 18:09       ` Julien Grall
2017-08-01 18:20         ` Oleksandr Tyshchenko
2017-08-01 17:56   ` Julien Grall

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='CAPD2p-=6pyWeE5VsDbP7roJx1nG-Fw3U5ZVfxCMu5e4pmFg0rg@mail.gmail.com' \
    --to=olekstysh@gmail.com \
    --cc=kevin.tian@intel.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=xen-devel@lists.xenproject.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 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.