From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a05:6512:3aa:0:0:0:0 with SMTP id v10csp3067267lfp; Sun, 9 Feb 2020 12:59:19 -0800 (PST) X-Google-Smtp-Source: APXvYqyenWLr+ObvZCVjVvO+4Fnz+3pOb59v6jvVV61uCA8kSKRXtkEScnFyZ3HS3aDDVIEGQkVY X-Received: by 2002:ac8:33f8:: with SMTP id d53mr7366717qtb.86.1581281958989; Sun, 09 Feb 2020 12:59:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581281958; cv=none; d=google.com; s=arc-20160816; b=edeAKtJN4GVINqlqJwsJcpaCUc9IcSlElQSWw1Y/xDdgRlhSiguQ9wgpg440vwktah a5cjB+VzvHaoL0xLDc9EVEEjcpQyKGgCMJ4dkcd4xMNzmjIDmmTFxC/2kBw8OIwOoN7F Ee/ThZj8QYrwdokPC0MyWdSTGNyWyG5KhwJ8TBZ3QWydKjCQ8GRE6m95GlmGnZ9ncVu3 Y81zW/ZwKEeJwrSqcJKsiAPBavCl/WtTYNBtZ6FRhe/i0mRR2tH+ryW1+JsBeAFccPU9 qp7ns6BSBEwpBY+18y3+SpqqEZzGVdJGvjwkWoZLEfZN3rqCQPS6DiXluLdZKTWetJqt dgLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:to:from:date:dkim-signature; bh=4TgsTYlq2uWpX5l3dOcoMSrO707rEi65LVX3fRa5d4g=; b=fpG7jjN/qY8gQSgHEr2HYfOnX1Ss+/8dCq9URzhbCKV6AWL2/rp5RGEXBCQhpBynwy ei1H37BbiMNnJj854V++P0lNBrNC0HSIIdO8VJaq+ovPgI+dwfGA3SruKzVpG62gPmFt VMvYopdYGDoepcpRfjwujlm3mFO4kzeAuEmGcC2JHO5LQppFb/2WkCyeIQnvxY1is3eE snCz6Q2ulpsK6yto9KFDBM8FTKWvTrc4UsycG/+Yt36YylSZ+QBLHjo7alqtvyTMFwnI uFajNUsylpcC476Ju9ETjMNFXY+v+qapROp3u4DWt2If/TjhZQSURYND3SyOoXuvN4In QTRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=Qypr55LI; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h1si3230893qtj.356.2020.02.09.12.59.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Feb 2020 12:59:18 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@redhat.com header.s=mimecast20190719 header.b=Qypr55LI; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:54392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0tfi-0005Hb-Bt for alex.bennee@linaro.org; Sun, 09 Feb 2020 15:59:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41553) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0tfZ-0005GQ-7l for qemu-arm@nongnu.org; Sun, 09 Feb 2020 15:59:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0tfW-0001eD-RR for qemu-arm@nongnu.org; Sun, 09 Feb 2020 15:59:07 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:26040 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j0tfW-0001cs-Gd for qemu-arm@nongnu.org; Sun, 09 Feb 2020 15:59:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581281945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4TgsTYlq2uWpX5l3dOcoMSrO707rEi65LVX3fRa5d4g=; b=Qypr55LIrRcrGI2xbs+QOevzDuaIdKu8x6IVHRKl7RMxuaxTAwoe5yi+oDRweZ0+vftL4c CtlYyt8vPiBac74mAlZda7Cdv6wNbnNC3XgnYIVtXmW50U0tRVXet/tLqPGVjuTCU3WOOb iG4TGUoDOxyhPlasYF2DKp3YdNilOWA= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-398-c3ZmjcO7O4eoqZFRtsjRtA-1; Sun, 09 Feb 2020 15:59:03 -0500 Received: by mail-qt1-f199.google.com with SMTP id l1so3177508qtp.21 for ; Sun, 09 Feb 2020 12:59:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=b8IZa3WqHO9P3WUfVwvQeYuuFSFdaUexg28Zj2YYOh4=; b=lp3phgAX3gq6yLmOtaemZZlu9PvP2JGfhhs9qt5+BN1SdnTa283n0qAzVGFDS2eb1c qG3LhS+llIZO5X4vD+pQ4D6Clf/OhD54h5KrGRI5GnFOYmayuwVvhhAxwuN7hUR6vWIX VYpbqUf+NLtkCAy2H580HkpuZblF7SW5HK/b65hUev2U46g12UeDkRr1rHEZNWISQeNy CPciIIGN0mEswRwyyPPaqnn96NYtzLNDIm7V5sba3U30aAReiHWihI7UTR3b+c5NFfep y0bA3ZyGIYMDtKUIKC5wB6jaQt8yvuR2Y4ouKw5YpSpBfMy2F9axz/VdcgSh0ZDyA+7c TN/w== X-Gm-Message-State: APjAAAXoK3j9moBFg2pdt0oOKiD1loTIIcY6O375w4zbCexbFQpetHuR UY4C6Pt8hg7tkc0fbxNmNRx5Bp21txfTXfiHzZN4R08t5GminayG1NRmtFwnlrpnFW8yQrDzQ2j hS/ufrYccGZCp X-Received: by 2002:a05:620a:6d4:: with SMTP id 20mr7988855qky.81.1581281942809; Sun, 09 Feb 2020 12:59:02 -0800 (PST) X-Received: by 2002:a05:620a:6d4:: with SMTP id 20mr7988840qky.81.1581281942562; Sun, 09 Feb 2020 12:59:02 -0800 (PST) Received: from redhat.com (bzq-79-176-41-183.red.bezeqint.net. [79.176.41.183]) by smtp.gmail.com with ESMTPSA id h8sm4997217qtm.51.2020.02.09.12.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Feb 2020 12:59:01 -0800 (PST) Date: Sun, 9 Feb 2020 15:58:57 -0500 From: "Michael S. Tsirkin" To: Peter Xu Subject: Re: [PATCH v14 08/11] virtio-iommu-pci: Introduce the x-dt-binding option Message-ID: <20200209155639-mutt-send-email-mst@kernel.org> References: <20200207093203.3788-1-eric.auger@redhat.com> <20200207093203.3788-9-eric.auger@redhat.com> <20200207100540.GA1999431@myrica> <20200207052405-mutt-send-email-mst@kernel.org> <20200207230405.GJ720553@xz-x1> MIME-Version: 1.0 In-Reply-To: <20200207230405.GJ720553@xz-x1> X-MC-Unique: c3ZmjcO7O4eoqZFRtsjRtA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, kevin.tian@intel.com, tnowicki@marvell.com, Jean-Philippe Brucker , quintela@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com, Eric Auger , bharatb.linux@gmail.com, qemu-arm@nongnu.org, eric.auger.pro@gmail.com Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: uCnrn7BczeMu 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, > > >=20 > > > 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: > > > >=20 > > > > Documentation/devicetree/bindings/virtio/iommu.txt. > > > >=20 > > > > 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. > > > >=20 > > > > Signed-off-by: Eric Auger > > > > Suggested-by: Michael S. Tsirkin > > > [...] > > > > @@ -39,6 +42,21 @@ static void virtio_iommu_pci_realize(VirtIOPCIPr= oxy *vpci_dev, Error **errp) > > > > VirtIOIOMMUPCI *dev =3D VIRTIO_IOMMU_PCI(vpci_dev); > > > > DeviceState *vdev =3D DEVICE(&dev->vdev); > > > > =20 > > > > + if (!dev->dt_binding) { > > > > + error_setg(errp, > > > > + "Instantiation currently only is possible if th= e machine " > > > > + "creates device tree iommu-map bindings, ie. AC= PI is not " > > > > + "yet supported"); > > > > + error_append_hint(errp, "use -virtio-iommu-pci,x-dt-bindin= g\n"); > > >=20 > > > "use -device virtio-iommu-pci,x-dt-binding"? > > >=20 > > > 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-li= ne > > > invocation that contains this option still works)? > > >=20 > > > Thanks, > > > Jean > >=20 > > 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-. >=20 > 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? >=20 > Thanks, It's all about not breaking users. Yes we document that x- interfaces are unstable. But that documentation is only=20 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. > --=20 > Peter Xu