public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: devicetree@vger.kernel.org, robh+dt@kernel.org,
	linux-kernel@vger.kernel.org, krzysztof.kozlowski+dt@linaro.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] dt-bindings: virtio: Convert virtio,pci-iommu to DT schema
Date: Thu, 22 Sep 2022 16:54:09 +0100	[thread overview]
Message-ID: <YyyFISBBUgeAOocY@myrica> (raw)
In-Reply-To: <6f692ece-b3ac-4115-370a-3c5e255dd0f8@linaro.org>

On Sun, Sep 18, 2022 at 10:23:06AM +0100, Krzysztof Kozlowski wrote:
> > +required:
> 
> Also: compatible
> 
> > +  - reg
> > +  - '#iommu-cells'
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    pcie0 {
> 
> Node name: pcie
> 
> > +        #address-cells = <3>;
> > +        #size-cells = <2>;
> > +
> 
> device_type and then you will see a bunch of warnings.

Right, I think I wanted to avoid pulling the whole PCIe baggage because it
requires a lot of properties that aren't relevant to the example. But
having tried it it's not too bad, and it ensures we validate the child
node.

Thanks,
Jean

> 
> > +        /*
> > +         * The IOMMU manages all functions in this PCI domain except
> > +         * itself. Omit BDF 00:01.0.
> > +         */
> > +        iommu-map = <0x0 &iommu0 0x0 0x8
> > +                     0x9 &iommu0 0x9 0xfff7>;
> > +
> > +        /* The IOMMU programming interface uses slot 00:01.0 */
> > +        iommu0: iommu@1,0 {
> > +            compatible = "pci1af4,1057";
> > +            reg = <0x800 0 0 0 0>;
> > +            #iommu-cells = <1>;
> > +        };
> > +    };
> > +
> > +    pcie1 {
> 
> Node name: pcie (so probably you will need unit address and reg)
> 
> > +        /*
> > +         * The IOMMU also manages all functions from this domain,
> > +         * with endpoint IDs 0x10000 - 0x1ffff
> > +         */
> > +        iommu-map = <0x0 &iommu0 0x10000 0x10000>;
> > +    };
> > +
> > +    ethernet {
> > +        /* The IOMMU manages this platform device with endpoint ID 0x20000 */
> > +        iommus = <&iommu0 0x20000>;
> > +    };
> > +
> > +...
> 
> 
> Best regards,
> Krzysztof
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

      parent reply	other threads:[~2022-09-22 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 13:22 [PATCH] dt-bindings: virtio: Convert virtio,pci-iommu to DT schema Jean-Philippe Brucker
     [not found] ` <6f692ece-b3ac-4115-370a-3c5e255dd0f8@linaro.org>
2022-09-22 15:54   ` Jean-Philippe Brucker [this message]

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=YyyFISBBUgeAOocY@myrica \
    --to=jean-philippe@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=virtualization@lists.linux-foundation.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