From: Jean-Philippe Brucker <jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
To: pmorel-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org,
Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>,
gerald.schaefer-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org
Cc: linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
walling-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org,
alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v1] iommu/s390: Declare s390 iommu reserved regions
Date: Fri, 18 Jan 2019 13:51:11 +0000 [thread overview]
Message-ID: <668fe734-e4bf-0342-ab8c-df54d9022db4@arm.com> (raw)
In-Reply-To: <3cd790d6-aa6f-e817-27ce-56d7a9b6b6e5-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>
Hi Pierre,
On 18/01/2019 13:29, Pierre Morel wrote:
> On 17/01/2019 14:02, Robin Murphy wrote:
>> On 15/01/2019 17:37, Pierre Morel wrote:
>>> The s390 iommu can only allow DMA transactions between the zPCI device
>>> entries start_dma and end_dma.
>>>
>>> Let's declare the regions before start_dma and after end_dma as
>>> reserved regions using the appropriate callback in iommu_ops.
>>>
>>> The reserved region may later be retrieved from sysfs or from
>>> the vfio iommu internal interface.
>>
>> For this particular case, I think the best solution is to give VFIO
>> the ability to directly interrogate the domain geometry (which s390
>> appears to set correctly already). The idea of reserved regions was
>> really for 'unexpected' holes inside the usable address space - using
>> them to also describe places that are entirely outside that address
>> space rather confuses things IMO.
>>
>> Furthermore, even if we *did* end up going down the route of actively
>> reserving addresses beyond the usable aperture, it doesn't seem
>> sensible for individual drivers to do it themselves when the core API
>> already describes the relevant information generically.
>>
>> Robin.
>
> Robin,
>
> I already posted a patch retrieving the geometry through
> VFIO_IOMMU_GET_INFO using a specific capability for the geometry [1],
> and AFAIU, Alex did not agree with this.
On arm we also need to report the IOMMU geometry to userspace (max IOVA
size in particular). Shameer has been working on a solution [2] that
presents a unified view of both geometry and reserved regions into the
VFIO_IOMMU_GET_INFO call, and I think we should go with that. If I
understand correctly it's currently blocked on the RMRR problem and
we're waiting for Jacob or Ashok to take a look at it, as Kevin pinged
them on thread [1]?
[2] https://lkml.org/lkml/2018/4/18/293
Thanks,
Jean
>
> What is different in what you propose?
>
> @Alex: I was hoping that this patch goes in your direction. What do you
> think?
>
> Thanks,
> Pierre
>
> [1]: https://lore.kernel.org/patchwork/patch/1030369/
>
>>
>>>
>>> This seems to me related with the work Shameer has started on
>>> vfio_iommu_type1 so I add Alex and Shameer to the CC list.
>>>
>>>
>>> Pierre Morel (1):
>>> iommu/s390: Declare s390 iommu reserved regions
>>>
>>> drivers/iommu/s390-iommu.c | 29 +++++++++++++++++++++++++++++
>>> 1 file changed, 29 insertions(+)
>>>
>>
>
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2019-01-18 13:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 17:37 [PATCH v1] iommu/s390: Declare s390 iommu reserved regions Pierre Morel
2019-01-15 17:37 ` Pierre Morel
2019-01-15 19:33 ` Gerald Schaefer
2019-01-16 9:33 ` Pierre Morel
2019-01-17 9:23 ` Shameerali Kolothum Thodi
2019-01-17 13:02 ` Pierre Morel
2019-01-17 13:02 ` Robin Murphy
2019-01-18 13:29 ` Pierre Morel
[not found] ` <3cd790d6-aa6f-e817-27ce-56d7a9b6b6e5-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>
2019-01-18 13:51 ` Jean-Philippe Brucker [this message]
2019-01-21 11:51 ` Pierre Morel
2019-01-21 15:50 ` Jean-Philippe Brucker
2019-01-22 17:58 ` Alex Williamson
2019-01-21 12:49 ` Robin Murphy
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=668fe734-e4bf-0342-ab8c-df54d9022db4@arm.com \
--to=jean-philippe.brucker-5wv7dgnigg8@public.gmane.org \
--cc=alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=gerald.schaefer-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-s390-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pmorel-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org \
--cc=robin.murphy-5wv7dgnIgG8@public.gmane.org \
--cc=walling-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.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 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).