[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <40758f3b-cab3-2096-1711-18837bc2f73b@gmail.com>
Date: Thu, 19 May 2022 02:48:31 +0300
From: Oleksandr <olekstysh@...il.com>
To: Rob Herring <robh@...nel.org>, Arnd Bergmann <arnd@...db.de>
Cc: xen-devel <xen-devel@...ts.xenproject.org>,
"open list:DRM DRIVER FOR QEMU'S CIRRUS DEVICE"
<virtualization@...ts.linux-foundation.org>,
DTML <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
Jason Wang <jasowang@...hat.com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Julien Grall <julien@....org>, Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Christoph Hellwig <hch@...radead.org>,
Jean-Philippe Brucker <jean-philippe@...aro.org>
Subject: Re: [PATCH V2 5/7] dt-bindings: Add xen,dev-domid property
description for xen-grant DMA ops
On 18.05.22 21:59, Rob Herring wrote:
Hello Rob, Arnd
> On Wed, May 18, 2022 at 03:32:27PM +0100, Arnd Bergmann wrote:
>> On Sat, May 7, 2022 at 7:19 PM Oleksandr Tyshchenko <olekstysh@...il.com> wrote:
>>> diff --git a/Documentation/devicetree/bindings/virtio/mmio.yaml b/Documentation/devicetree/bindings/virtio/mmio.yaml
>>> index 10c22b5..29a0932 100644
>>> --- a/Documentation/devicetree/bindings/virtio/mmio.yaml
>>> +++ b/Documentation/devicetree/bindings/virtio/mmio.yaml
>>> @@ -13,6 +13,9 @@ description:
>>> See https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio for
>>> more details.
>>>
>>> +allOf:
>>> + - $ref: /schemas/arm/xen,dev-domid.yaml#
>>> +
>>> properties:
>>> compatible:
>>> const: virtio,mmio
>>> @@ -33,6 +36,10 @@ properties:
>>> description: Required for devices making accesses thru an IOMMU.
>>> maxItems: 1
>>>
>>> + xen,dev-domid:
>>> + description: Required when Xen grant mappings need to be enabled for device.
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> +
>>> required:
>>> - compatible
>>> - reg
>> Sorry for joining the discussion late. Have you considered using the
>> generic iommu
>> binding here instead of a custom property? This would mean having a device
>> node for the grant-table mechanism that can be referred to using the 'iommus'
>> phandle property, with the domid as an additional argument.
>>
>> It does not quite fit the model that Linux currently uses for iommus,
>> as that has an allocator for dma_addr_t space, but it would think it's
>> conceptually close enough that it makes sense for the binding.
> Something common is almost always better.
agree
>
> That may also have the issue that fw_devlink will make the 'iommu'
> driver a dependency to probe.
Looks like I ran into it while experimenting. I generated the following
nodes in guest DT using Xen toolstack:
[snip]
xen_dummy_iommu {
compatible = "xen,dummy-iommu";
#iommu-cells = <0x01>;
phandle = <0xfde9>;
};
virtio@...0000 {
compatible = "virtio,mmio";
reg = <0x00 0x2000000 0x00 0x200>;
interrupts = <0x00 0x01 0xf01>;
interrupt-parent = <0xfde8>;
dma-coherent;
iommus = <0xfde9 0x01>;
};
[snip]
And got:
virtio-mmio 2000000.virtio: deferred probe timeout, ignoring dependency
>
> Rob
--
Regards,
Oleksandr Tyshchenko
Powered by blists - more mailing lists