Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp233955rwb; Thu, 6 Oct 2022 17:37:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7660hmsaw7AAoJ4ecGf/dcvZ8SeNkOAxdmB7mb9c3IZm+2tyJ/rkZYiXWMI8WwvxV0pP2v X-Received: by 2002:a17:90b:4a4d:b0:20a:c49f:9928 with SMTP id lb13-20020a17090b4a4d00b0020ac49f9928mr13363236pjb.133.1665103063303; Thu, 06 Oct 2022 17:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665103063; cv=none; d=google.com; s=arc-20160816; b=b/7RJ+i10foInerANNPQBojgY9V8KQK/p71xKZFwpNBsf+DmOg3eKOcYkvprBdwQBU Wmffp6IGpFWQ6aGOl+zymRUmNyxiSRdVrB+iElg4huC0f88jimx7pyumWiKQFTFn5T64 1k5xUFfg1gPiLz4pdn5bj+6X2MBzCC++lBLIlKdiGevk7AJd3IXqpPj2Q3JGXjjjtCEu CCeEueZ+udA5VJOCGguKYaK05v31IjTmWqzhQNTj/OpS4D/UjEm3UFOGsrfsiljcXyED 93bpKpIvnDziUZx34EQbsURGVmQ09vJ4A6GIYnPVZZQPOPAzD8TrqY8MqQZCefeISlf6 VwUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=ph97D/eaRY1ylndjisYbbqEbLQdNe0JjPQQxUowQXro=; b=dj86KD+MPLgHyISiXgdJlp2gMpCIizA+fvVxwTBCLDaaHCGbotUgnwvAF57gm1syw5 O4X0sJ2la0E3kwg6mdQRLXfNiKaIc/CzLvJUEtGast0AIa2Gb9u57Za7YOY610guELEb Sv5URhJdw8xTyOBr9mjz2SCpOLOUGCvQXUhgpLU/4einqVvKn0X5VVK1RVXim+XRw7Iy 0/xIdvG0ZGk/Qb2V74tLodKDYgqLY/HXCCdgKbOKPIE/zSiLdSKQ/60GzaRwEBb8rpJd +ZIpVfL9I+w38UE0xw4WDW/1bHTRhgv56H1XjZjphVaoJu1c2eOewuIfJdq2KrbDmRU1 QaKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kVleMf6z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr9-20020a056a000f0900b0053e15843f1fsi591876pfb.131.2022.10.06.17.37.30; Thu, 06 Oct 2022 17:37:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kVleMf6z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232346AbiJGAYB (ORCPT + 99 others); Thu, 6 Oct 2022 20:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbiJGAX7 (ORCPT ); Thu, 6 Oct 2022 20:23:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65A1FFF8D6 for ; Thu, 6 Oct 2022 17:23:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 282D6B821E3 for ; Fri, 7 Oct 2022 00:23:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33C89C433D6; Fri, 7 Oct 2022 00:23:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665102235; bh=wNxxAaNgmv1Yy2qhYYPm61z1GMJgbu+XBvZGxaEoE4U=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=kVleMf6zL6f1pwxe3/B2+3DcPTeU3X6a/wIGPDmirHr2H5djKLv8hAP3MT3r/KeNf 7Iu7krEgUK6RMUuh3oPWvGrQoXgT2rnlUWnpQAmGvFOxkLRwSVN/czsbTqpoRF0O8Z EhEIImTKy/roVmqFiE6fJZ3RGfNgwaNLXYa5++bk1MZjcXL6OwB6vcyL9bgQ9OR1pb jikOOGFNJiMQPE/gzN5LBfzAc3yW4s/F6xrNdBGknOVcyIGL7sELIUIkqRrD2ePMEO 21i9P/Q+7ae1hDCMjXB6nym3qwmuxGJYwmp8gX7d/2w0uCx0MaycdEKFVKwMoN3klc qldIYJvaWDb5g== Date: Thu, 6 Oct 2022 17:23:52 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: Oleksandr Tyshchenko cc: Juergen Gross , "linux-kernel@vger.kernel.org" , Stefano Stabellini , "xen-devel@lists.xenproject.org" Subject: Re: [PATCH 2/3] xen/virtio: use dom0 as default backend for CONFIG_XEN_VIRTIO_FORCE_GRANT In-Reply-To: <36b69e76-a26e-f7e5-998a-8345034cec20@epam.com> Message-ID: References: <20221006071500.15689-1-jgross@suse.com> <20221006071500.15689-3-jgross@suse.com> <36b69e76-a26e-f7e5-998a-8345034cec20@epam.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Thu, 6 Oct 2022, Oleksandr Tyshchenko wrote: > On 06.10.22 10:14, Juergen Gross wrote: > > Hello Juergen > > > With CONFIG_XEN_VIRTIO_FORCE_GRANT set the default backend domid to 0, > > enabling to use xen_grant_dma_ops for those devices. > > > > Signed-off-by: Juergen Gross > > --- > > drivers/xen/grant-dma-ops.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > Reviewed-by: Oleksandr Tyshchenko Acked-by: Stefano Stabellini > > diff --git a/drivers/xen/grant-dma-ops.c b/drivers/xen/grant-dma-ops.c > > index f29759d5301f..a00112235877 100644 > > --- a/drivers/xen/grant-dma-ops.c > > +++ b/drivers/xen/grant-dma-ops.c > > @@ -349,6 +349,9 @@ void xen_grant_setup_dma_ops(struct device *dev) > > if (dev->of_node) { > > if (xen_dt_grant_setup_dma_ops(dev, data)) > > goto err; > > + } else if (IS_ENABLED(CONFIG_XEN_VIRTIO_FORCE_GRANT)) { > > + dev_info(dev, "Using dom0 as backend\n"); > > + data->backend_domid = 0; > > } else { > > /* XXX ACPI device unsupported for now */ > > goto err; > > -- > Regards, > > Oleksandr Tyshchenko >