[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding optio
From: |
Michael S. Tsirkin |
Subject: |
Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option |
Date: |
Sun, 9 Feb 2020 15:58:57 -0500 |
On Fri, Feb 07, 2020 at 06:04:05PM -0500, Peter Xu wrote:
> On Fri, Feb 07, 2020 at 05:24:54AM -0500, Michael S. Tsirkin wrote:
> > On Fri, Feb 07, 2020 at 11:05:40AM +0100, Jean-Philippe Brucker wrote:
> > > Hi Eric,
> > >
> > > On Fri, Feb 07, 2020 at 10:32:00AM +0100, Eric Auger wrote:
> > > > At the moment, the kernel only supports device tree
> > > > integration of the virtio-iommu. DT bindings between the
> > > > PCI root complex and the IOMMU must be created by the machine
> > > > in conformance to:
> > > >
> > > > Documentation/devicetree/bindings/virtio/iommu.txt.
> > > >
> > > > To make sure the end-user is aware of this, force him to use the
> > > > temporary device option "x-dt-binding" and also double check the
> > > > machine has a hotplug handler for the virtio-iommu-pci device.
> > > > This hotplug handler is in charge of creating those DT bindings.
> > > >
> > > > Signed-off-by: Eric Auger <address@hidden>
> > > > Suggested-by: Michael S. Tsirkin <address@hidden>
> > > [...]
> > > > @@ -39,6 +42,21 @@ static void virtio_iommu_pci_realize(VirtIOPCIProxy
> > > > *vpci_dev, Error **errp)
> > > > VirtIOIOMMUPCI *dev = VIRTIO_IOMMU_PCI(vpci_dev);
> > > > DeviceState *vdev = DEVICE(&dev->vdev);
> > > >
> > > > + if (!dev->dt_binding) {
> > > > + error_setg(errp,
> > > > + "Instantiation currently only is possible if the
> > > > machine "
> > > > + "creates device tree iommu-map bindings, ie. ACPI
> > > > is not "
> > > > + "yet supported");
> > > > + error_append_hint(errp, "use
> > > > -virtio-iommu-pci,x-dt-binding\n");
> > >
> > > "use -device virtio-iommu-pci,x-dt-binding"?
> > >
> > > Can the option be safely removed as soon as we implement a topology
> > > description for the remaining platforms? Or will we need to carry it
> > > forever for backward-compatibility (ie. ensure that an old command-line
> > > invocation that contains this option still works)?
> > >
> > > Thanks,
> > > Jean
> >
> > I'd worry that if we actually document it then users will come to
> > depend on it for sure, even though it starts with x-.
>
> I thought x- parameters can be dropped directly with totally no
> grarantee... Otherwise how do we differenciate x- with the common
> parameters, and how do we introduce remove-prone parameters?
>
> Thanks,
It's all about not breaking users. Yes we document that x-
interfaces are unstable. But that documentation is only
good for well-behaved users such as libvirt. End-users
tend not to read the docs and the subtleties of
stable/unstable interface are lost on them, so we really must never
actively ask end users to set an x- flag.
> --
> Peter Xu
- [PATCH v14 04/11] virtio-iommu: Implement map/unmap, (continued)
- [PATCH v14 04/11] virtio-iommu: Implement map/unmap, Eric Auger, 2020/02/07
- [PATCH v14 05/11] virtio-iommu: Implement translate, Eric Auger, 2020/02/07
- [PATCH v14 06/11] virtio-iommu: Implement fault reporting, Eric Auger, 2020/02/07
- [PATCH v14 07/11] virtio-iommu-pci: Add virtio iommu pci support, Eric Auger, 2020/02/07
- [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option, Eric Auger, 2020/02/07
- Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option, Jean-Philippe Brucker, 2020/02/07
- Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option, Auger Eric, 2020/02/07
- Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option, Michael S. Tsirkin, 2020/02/07
- Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option, Auger Eric, 2020/02/07
- Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option, Peter Xu, 2020/02/07
- Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option,
Michael S. Tsirkin <=
- Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option, Peter Xu, 2020/02/10
Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option, Michael S. Tsirkin, 2020/02/07
Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option, Michael S. Tsirkin, 2020/02/07
Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option, Auger Eric, 2020/02/07
[PATCH v14 09/11] hw/arm/virt: Add the virtio-iommu device tree mappings, Eric Auger, 2020/02/07
[PATCH v14 10/11] virtio-iommu: Support migration, Eric Auger, 2020/02/07
[PATCH v14 11/11] tests: Add virtio-iommu test, Eric Auger, 2020/02/07