Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp245688iob; Mon, 2 May 2022 18:23:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/hD5xgDHALCP8SB3sCz3P2xN0/unEZbjl/MpEGWnIeueT9MYF6GU9GOJzEioz+XSGy7lJ X-Received: by 2002:a17:903:1211:b0:15e:8208:8cc0 with SMTP id l17-20020a170903121100b0015e82088cc0mr14466481plh.52.1651540994316; Mon, 02 May 2022 18:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651540994; cv=none; d=google.com; s=arc-20160816; b=KvjiNnd7o8546bOpK8S6TAyz7aEeojQvw7XcGJVBt32l+TluVVMI5lYc/lEz8Ziz1x NamidlNxvNKooWfJvJ8HPgBM9VKE/VnIJ/F9h03jA5j8bdBS/gmFKCmRXEzFXrU5XjPT vcmh3qjWK+R5jeK/k6X1X1sC/xsCv4/fl1DvfPbB1SLNrjV+VxM386xp3HRlkGawphXj CFkNL9DmPzDHMdAzKHsWOPKgynhv/jVH2kqucND/EB7caPwmqprCz0gOMBHZ3vMJxXKH E1ojl+5fgXkKtEYsw6Kli29XafxUQ4usYsyKvdtCG+YqLhj9EvVUtC6PMPEFQX4zXE+P p0Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=OfkNLJQzEZ7e5xPqfxUYJG64Wv+bQWkevq09mi7Lx3c=; b=f9AhEbrq3C5c/fYRsUTutWqM9NiNmxzzIAGwKXKNgkl/0M4ebYCvS69XP53+ZcBiOU SwuZ9lUOKYrGftVu1AYqColdx4v7F6PZdbtr2vyCE3lQdd3DXN703qlLaNNjlImtqEuV kFb8Ah2358/3fUCk6BV3P8kOI0qIa6B6WedBMfBbXnqxkmPVZbeKC/hh6AN6XKfRtRn+ e6+rJmpgaab5viiDepEK6e4SsD534N36ugh3VqDYoWVo9SMpcf8supqiSflqYFlV0mCW +65V/RuNOBAyzIfRvDnRl5JNqv6TcfFFTADKqF0MfUQRHkQzO+mFQAFmIdcoi/7Lc0hl h0qQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f1-20020a62db01000000b004fa8832da6dsi15500864pfg.76.2022.05.02.18.23.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 18:23:14 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E7A6A55368; Mon, 2 May 2022 18:02:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351491AbiEBWD0 (ORCPT + 99 others); Mon, 2 May 2022 18:03:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231668AbiEBWDR (ORCPT ); Mon, 2 May 2022 18:03:17 -0400 Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 392471FF; Mon, 2 May 2022 14:59:47 -0700 (PDT) Received: by mail-oo1-f48.google.com with SMTP id l9-20020a4abe09000000b0035eb3d4a2aeso1929899oop.0; Mon, 02 May 2022 14:59:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OfkNLJQzEZ7e5xPqfxUYJG64Wv+bQWkevq09mi7Lx3c=; b=aH+vPtiB8afc82+9H3j0WhIkxZLLh2yOvX15hoqRTWu+pf00Mw6OjT8FxUtH1nOulL avYb0UoOcu/e6YvBWKVpZwu8/U8OZ9XKJqs04JrrZIcjoaqgzf1b3Z1Wb4cPED0aavaQ JZ5kdvUuk3N9jT8YNmJsqxA5DvNnlDl2kykBYPGkwWSfmNjtQ3i9jcZ8qE9SxtHKPoCo kw5SJAR0gvf3pODtIGTHcLYNBWjdNCJLsi3yvDsrj/wuUfkGpMiPa2i+YjqGRfwGqbZd qYmY7ZsosJZ0qP5DqtyOwO8sttB7YQ7FW2EI+Y85w8I6/0swidZ8+KSnC/ZfXy3QPVu/ xOHA== X-Gm-Message-State: AOAM532+2NohzzVA++hkcrUyRpD6yeDGFWOOpZACaswhTWzCEVbqt6II co+ZJs8cpFaRJy9XJZD+ag== X-Received: by 2002:a4a:ac45:0:b0:35e:a8f2:7f55 with SMTP id q5-20020a4aac45000000b0035ea8f27f55mr4805941oon.46.1651528786470; Mon, 02 May 2022 14:59:46 -0700 (PDT) Received: from robh.at.kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id s1-20020a4ae541000000b0035eb4e5a6c8sm4329464oot.30.2022.05.02.14.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 14:59:46 -0700 (PDT) Received: (nullmailer pid 1863055 invoked by uid 1000); Mon, 02 May 2022 21:59:45 -0000 Date: Mon, 2 May 2022 16:59:45 -0500 From: Rob Herring To: Oleksandr Tyshchenko Cc: xen-devel@lists.xenproject.org, virtualization@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Oleksandr Tyshchenko , Jason Wang , Krzysztof Kozlowski , Julien Grall , Juergen Gross , Stefano Stabellini , "Michael S. Tsirkin" , Christoph Hellwig Subject: Re: [PATCH V1 4/6] dt-bindings: Add xen,dev-domid property description for xen-grant DMA ops Message-ID: References: <1650646263-22047-1-git-send-email-olekstysh@gmail.com> <1650646263-22047-5-git-send-email-olekstysh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1650646263-22047-5-git-send-email-olekstysh@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 22, 2022 at 07:51:01PM +0300, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Introduce Xen specific binding for the virtualized device (e.g. virtio) > to be used by Xen grant DMA-mapping layer in the subsequent commit. > > This binding indicates that Xen grant mappings scheme needs to be > enabled for the device which DT node contains that property and specifies > the ID of Xen domain where the corresponding backend resides. The ID > (domid) is used as an argument to the grant mapping APIs. > > This is needed for the option to restrict memory access using Xen grant > mappings to work which primary goal is to enable using virtio devices > in Xen guests. > > Signed-off-by: Oleksandr Tyshchenko > --- > Changes RFC -> V1: > - update commit subject/description and text in description > - move to devicetree/bindings/arm/ > --- > .../devicetree/bindings/arm/xen,dev-domid.yaml | 37 ++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > create mode 100644 Documentation/devicetree/bindings/arm/xen,dev-domid.yaml > > diff --git a/Documentation/devicetree/bindings/arm/xen,dev-domid.yaml b/Documentation/devicetree/bindings/arm/xen,dev-domid.yaml > new file mode 100644 > index 00000000..ef0f747 > --- /dev/null > +++ b/Documentation/devicetree/bindings/arm/xen,dev-domid.yaml > @@ -0,0 +1,37 @@ > +# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/arm/xen,dev-domid.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Xen specific binding for the virtualized device (e.g. virtio) > + > +maintainers: > + - Oleksandr Tyshchenko > + > +select: true Do we really need to support this property everywhere? > + > +description: > + This binding indicates that Xen grant mappings scheme needs to be enabled > + for that device and specifies the ID of Xen domain where the corresponding > + device (backend) resides. This is needed for the option to restrict memory > + access using Xen grant mappings to work. > + > +properties: > + xen,dev-domid: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + The domid (domain ID) of the domain where the device (backend) is running. > + > +additionalProperties: true > + > +examples: > + - | > + virtio_block@3000 { virtio@3000 > + compatible = "virtio,mmio"; > + reg = <0x3000 0x100>; > + interrupts = <41>; > + > + /* The device is located in Xen domain with ID 1 */ > + xen,dev-domid = <1>; This fails validation: Documentation/devicetree/bindings/arm/xen,dev-domid.example.dtb: virtio_block@3000: xen,dev-domid: [[1]] is not of type 'object' From schema: /home/rob/proj/git/linux-dt/Documentation/devicetree/bindings/virtio/mmio.yaml The property has to be added to the virtio/mmio.yaml schema. If it is not needed elsewhere, then *just* add the property there. Rob