All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Oleksandr Tyshchenko <olekstysh@gmail.com>,
	Julien Grall <julien.grall@linaro.org>
Cc: Kevin Tian <kevin.tian@intel.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
	Julien Grall <julien.grall@arm.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 06/13] iommu: Add extra use_iommu argument to iommu_domain_init()
Date: Thu, 07 Dec 2017 05:51:15 -0700	[thread overview]
Message-ID: <5A29475302000078001957FE@prv-mh.provo.novell.com> (raw)
In-Reply-To: <CAPD2p-ngOvoqkFnZGDB81Eqe3Jj73cEEZSJHvVN8P5s33MTMaQ@mail.gmail.com>

>>> On 07.12.17 at 13:08, <olekstysh@gmail.com> wrote:
> On Thu, Dec 7, 2017 at 12:49 AM, Julien Grall <julien.grall@linaro.org> wrote:
>> On 12/06/2017 07:53 PM, Oleksandr Tyshchenko wrote:
>>> On Wed, Dec 6, 2017 at 6:51 PM, Jan Beulich <JBeulich@suse.com> wrote:
>>>>>>>
>>>>>>> On 25.07.17 at 19:26, <olekstysh@gmail.com> wrote:
>>>>>
>>>>> The presence of this flag lets us know that the guest domain has
>>>>> statically
>>>>> assigned devices which will most likely be used for passthrough
>>>>> and as the result the IOMMU is expected to be used for this domain.
>>>>>
>>>>> Taking into the account this hint when dealing with non-shared IOMMUs
>>>>> we can populate IOMMU page tables before hand avoid going through
>>>>> the list of pages at the first assigned device.
>>>>> As this flag doesn't cover hotplug case, we will continue to populate
>>>>> IOMMU page tables on the fly.
>>>>
>>>>
>>>> While of course it would have been nice if I would have found time
>>>> earlier to look at this patch (and hence closer to when the discussion
>>>> happened), I still don't see it being made sufficiently clear here why
>>>> current behavior (without a need for such a flag) is a problem for the
>>>> non-shared IOMMU case on ARM, when it isn't on x86.
>>>
>>>
>>> The answer is the lack of M2P on ARM. When the first device is being
>>> assigned to domain we are populating non-shared IOMMU page-table.
>>> What does it mean? We are iterating through the list of the pages
>>> (d->page_list) and retrieving a pair of mfn <-> gfn for each page on
>>> x86.
>>> We can't do the same on ARM, since there is no M2P table. The
>>> mfn_to_gmfn macros is just a stub:
>>> #define mfn_to_gmfn(_d, mfn)  (mfn)
>>>
>>> To be honest I haven't played with non-shared IOMMU on ARM
>>> since the end of this summer to be 100% sure that it is still an
>>> issue. But, it seems to be.
>>
>>
>> The situation has not changed. I still see no point of waste memory for the
>> M2P (see the full discussion here [1]).
>>
>> However, I agree with Jan that we need a summary of the discussion in the
>> commit message.
> Sure.
> 
> Jan, is the clarification I have provided (why it is a problem for the
> non-shared IOMMU case on ARM, when it isn't on x86) sufficiently clear and

Yes, mentioning the lack of M2P is goin g to be sufficient rationale.

> the current patch with "updated" commit message will be ready to get your 
> ack?

I think so, albeit I haven't fully settled yet whether to push back
on the ARM folks not wanting to introduce M2P.

Jan


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

  reply	other threads:[~2017-12-07 12:51 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 [this message]
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
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=5A29475302000078001957FE@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=julien.grall@linaro.org \
    --cc=kevin.tian@intel.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=olekstysh@gmail.com \
    --cc=sstabellini@kernel.org \
    --cc=suravee.suthikulpanit@amd.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.