All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
To: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Jean-Philippe Brucker
	<jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
Cc: Mark Rutland <Mark.Rutland-5wv7dgnIgG8@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jayachandran.nair-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org,
	tnowicki-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org,
	kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	virtio-dev-sDuHXQ4OtrM4h7I2RyI4rWD2FQJk+8+b@public.gmane.org,
	Marc Zyngier <Marc.Zyngier-5wv7dgnIgG8@public.gmane.org>,
	jasowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	Will Deacon <Will.Deacon-5wv7dgnIgG8@public.gmane.org>,
	virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Linux IOMMU
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org
Subject: Re: [PATCH v2 1/5] dt-bindings: virtio: Specify #iommu-cells value for a virtio-iommu
Date: Wed, 4 Jul 2018 12:45:20 +0100	[thread overview]
Message-ID: <0d701fb2-aea5-12a2-e07e-ba128e2e36e7@arm.com> (raw)
In-Reply-To: <CAL_JsqLdahF+2VsH9h658z9guO0XmqHM75QLaHApZLNP8twUNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 27/06/18 18:46, Rob Herring wrote:
> On Tue, Jun 26, 2018 at 11:59 AM Jean-Philippe Brucker
> <jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org> wrote:
>>
>> On 25/06/18 20:27, Rob Herring wrote:
>>> On Thu, Jun 21, 2018 at 08:06:51PM +0100, Jean-Philippe Brucker wrote:
>>>> A virtio-mmio node may represent a virtio-iommu device. This is discovered
>>>> by the virtio driver at probe time, but the DMA topology isn't
>>>> discoverable and must be described by firmware. For DT the standard IOMMU
>>>> description is used, as specified in bindings/iommu/iommu.txt and
>>>> bindings/pci/pci-iommu.txt. Like many other IOMMUs, virtio-iommu
>>>> distinguishes masters by their endpoint IDs, which requires one IOMMU cell
>>>> in the "iommus" property.
>>>>
>>>> Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
>>>> ---
>>>>   Documentation/devicetree/bindings/virtio/mmio.txt | 8 ++++++++
>>>>   1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/virtio/mmio.txt b/Documentation/devicetree/bindings/virtio/mmio.txt
>>>> index 5069c1b8e193..337da0e3a87f 100644
>>>> --- a/Documentation/devicetree/bindings/virtio/mmio.txt
>>>> +++ b/Documentation/devicetree/bindings/virtio/mmio.txt
>>>> @@ -8,6 +8,14 @@ Required properties:
>>>>   - reg:              control registers base address and size including configuration space
>>>>   - interrupts:       interrupt generated by the device
>>>>
>>>> +Required properties for virtio-iommu:
>>>> +
>>>> +- #iommu-cells:     When the node describes a virtio-iommu device, it is
>>>> +            linked to DMA masters using the "iommus" property as
>>>> +            described in devicetree/bindings/iommu/iommu.txt. For
>>>> +            virtio-iommu #iommu-cells must be 1, each cell describing
>>>> +            a single endpoint ID.
>>>
>>> The iommus property should also be documented for the client side.
>>
>> Isn't section "IOMMU master node" of iommu.txt sufficient? Since the
>> iommus property applies to any DMA master, not only virtio-mmio devices,
>> the canonical description in iommu.txt seems the best place for it, and
>> I'm not sure what to add in this file. Maybe a short example below the
>> virtio_block one?
> 
> No, because somewhere we have to capture if 'iommus' is valid for
> 'virtio-mmio' or not. Hopefully soon we'll actually be able to
> validate that.

Indeed, it's rather unusual to have a single compatible which may either 
be an IOMMU or an IOMMU client (but not both at once, I hope!), so 
nailing down the exact semantics as clearly as possible would definitely 
be desirable.

Robin.

  parent reply	other threads:[~2018-07-04 11:45 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21 19:06 [PATCH v2 0/5] Add virtio-iommu driver Jean-Philippe Brucker
2018-06-21 19:06 ` [virtio-dev] " Jean-Philippe Brucker
2018-06-21 19:06 ` [PATCH v2 1/5] dt-bindings: virtio: Specify #iommu-cells value for a virtio-iommu Jean-Philippe Brucker
2018-06-21 19:06   ` [virtio-dev] " Jean-Philippe Brucker
2018-06-25 19:27   ` Rob Herring
2018-06-26 17:58     ` Jean-Philippe Brucker
2018-06-26 17:58     ` Jean-Philippe Brucker
2018-06-26 17:58       ` [virtio-dev] " Jean-Philippe Brucker
     [not found]       ` <89d31865-ee35-ef8c-f7b3-f3acf2bbd30e-5wv7dgnIgG8@public.gmane.org>
2018-06-27 17:46         ` Rob Herring
     [not found]           ` <CAL_JsqLdahF+2VsH9h658z9guO0XmqHM75QLaHApZLNP8twUNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-04 11:45             ` Robin Murphy [this message]
2018-07-04 11:45           ` Robin Murphy
2018-06-27 17:46       ` Rob Herring
2018-06-21 19:06 ` Jean-Philippe Brucker
2018-06-21 19:06 ` [PATCH v2 2/5] iommu: Add virtio-iommu driver Jean-Philippe Brucker
2018-06-21 19:06 ` Jean-Philippe Brucker
2018-06-21 19:06   ` [virtio-dev] " Jean-Philippe Brucker
     [not found]   ` <20180621190655.56391-3-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2018-06-22  0:51     ` Michael S. Tsirkin
2018-06-22  0:51       ` [virtio-dev] " Michael S. Tsirkin
     [not found]       ` <20180622033720-mutt-send-email-mst-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2018-06-25 17:52         ` Jean-Philippe Brucker
2018-06-25 17:52           ` [virtio-dev] " Jean-Philippe Brucker
2018-06-25 17:52       ` Jean-Philippe Brucker
2018-06-22  0:51   ` Michael S. Tsirkin
2018-06-21 19:06 ` [PATCH v2 3/5] iommu/virtio: Add probe request Jean-Philippe Brucker
2018-06-21 19:06 ` Jean-Philippe Brucker
2018-06-21 19:06   ` [virtio-dev] " Jean-Philippe Brucker
     [not found]   ` <20180621190655.56391-4-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2018-06-22  0:55     ` Michael S. Tsirkin
2018-06-22  0:55       ` [virtio-dev] " Michael S. Tsirkin
2018-06-25 17:52       ` Jean-Philippe Brucker
2018-06-25 17:52         ` [virtio-dev] " Jean-Philippe Brucker
2018-06-22  0:55   ` Michael S. Tsirkin
2018-06-26 17:59   ` [virtio-dev] " Jean-Philippe Brucker
2018-06-26 17:59   ` Jean-Philippe Brucker
2018-06-26 17:59     ` [virtio-dev] " Jean-Philippe Brucker
2018-06-21 19:06 ` [PATCH v2 4/5] iommu/virtio: Add event queue Jean-Philippe Brucker
2018-06-21 19:06 ` Jean-Philippe Brucker
2018-06-21 19:06   ` [virtio-dev] " Jean-Philippe Brucker
2018-06-21 19:06 ` [PATCH v2 5/5] vfio: Allow type-1 IOMMU instantiation for ARM Jean-Philippe Brucker
2018-06-21 19:06   ` [virtio-dev] " Jean-Philippe Brucker
2018-06-21 19:06 ` Jean-Philippe Brucker
2018-06-26 18:07 ` [PATCH v2 0/5] Add virtio-iommu driver Michael S. Tsirkin
     [not found] ` <20180621190655.56391-1-jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
2018-06-26 18:07   ` Michael S. Tsirkin
2018-06-26 18:07     ` [virtio-dev] " Michael S. Tsirkin
2018-06-27 18:04     ` Jean-Philippe Brucker
2018-06-27 18:04       ` [virtio-dev] " Jean-Philippe Brucker
2018-06-27 19:59       ` Michael S. Tsirkin
2018-06-27 19:59         ` [virtio-dev] " Michael S. Tsirkin
2018-06-28  9:40         ` Peter Maydell
2018-07-04 11:25         ` Jean-Philippe Brucker
2018-07-04 11:25         ` Jean-Philippe Brucker
2018-07-04 11:25           ` [virtio-dev] " Jean-Philippe Brucker
2018-06-27 19:59       ` Michael S. Tsirkin
2018-06-27 18:04     ` Jean-Philippe Brucker

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=0d701fb2-aea5-12a2-e07e-ba128e2e36e7@arm.com \
    --to=robin.murphy-5wv7dgnigg8@public.gmane.org \
    --cc=Marc.Zyngier-5wv7dgnIgG8@public.gmane.org \
    --cc=Mark.Rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=Will.Deacon-5wv7dgnIgG8@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jasowang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jayachandran.nair-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
    --cc=jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org \
    --cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org \
    --cc=mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=tnowicki-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org \
    --cc=virtio-dev-sDuHXQ4OtrM4h7I2RyI4rWD2FQJk+8+b@public.gmane.org \
    --cc=virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@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 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.