Re: [PATCH] dt-bindings: virtio: Convert virtio,pci-iommu to DT schema
From: Jean-Philippe Brucker
Date: Thu Sep 22 2022 - 11:54:25 EST
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