Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4270117ybg; Mon, 8 Jun 2020 03:39:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxThfo1/mlW6jkhM89qva1jE8bYAJzeUpS4tiNY2bmRpwjH3KJMqsCOVVQ8Nc99w9BwX2vw X-Received: by 2002:a17:906:6156:: with SMTP id p22mr19195785ejl.329.1591612762688; Mon, 08 Jun 2020 03:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591612762; cv=none; d=google.com; s=arc-20160816; b=YISCQdhk8my4XNIRgS6D6drB7D3dauPwjEHggR3AljOnYomwgCdtiOTmz3ZuNQCvXq R8Ty42Pkk0AIsUePllqTKfm2h57VddHjeDw/g8pugL3ygtUCQFnkO1wOvnhVywnr6sC8 gcD4McY7X1MYRai4qa5NMD/VLNQ1MZn9PH8ZMm8AtkG9eLezPeD1vT51k/fs6/WO9zgX T509e72C/H1tCAH70Emn3+iCOKK3VsWMrhBVXh6fmfSUZqIig+bIT8u7CW8afcOc+G8v KreJYSa/MIsXXehRtbW6XTEgkSrjJVPploN+UOI/XnfiTb509vle2W/6aAF52TgHrHit Axmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=37datdXl0TF4cHt39unBvjQQpavQ7FoeHgZeTkd6cVo=; b=CdIsXjyMuwCrO3noABE+qiVggIpGW9oU3j2O4dEMLNkhdo+ZVhFq4wlPnMXb3l0NHf XQl6nup8ZJS4KXqJHcaFxvLMjG+GQ28w0opk/d0Qcu/+ubZRCXHqOhJJVVipCQSs2ueA OwE13BtyI6QbXVQWlC+lHXWpvyPn+Lt+h93hv53Lf7lJLiRok7SmwzbFmdmC0TtGHrqC /nTz2OTuxDtSaDdfABrRjtzozdm88EmlujADQNmRLgsba33byw6WN/xKFo0p0KHgGQE6 V0CxSbNbC5aCcFHKoLePLLcRg2t/XUc3mGwqiZFiu/Qs/zgqgK5tx/akvADjvaITqHcx jyPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jWuBi3gB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg4si8297081edb.439.2020.06.08.03.38.58; Mon, 08 Jun 2020 03:39:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jWuBi3gB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729326AbgFHKhJ (ORCPT + 99 others); Mon, 8 Jun 2020 06:37:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729280AbgFHKhH (ORCPT ); Mon, 8 Jun 2020 06:37:07 -0400 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0C95C08C5C4 for ; Mon, 8 Jun 2020 03:37:07 -0700 (PDT) Received: by mail-qv1-xf42.google.com with SMTP id di13so1975817qvb.12 for ; Mon, 08 Jun 2020 03:37:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=37datdXl0TF4cHt39unBvjQQpavQ7FoeHgZeTkd6cVo=; b=jWuBi3gBOqpp71BpWC1WbZEGMxzH3MTotBqy+CTTW/ii1+t6JbNX14i+Didnl9fYdQ Lx0RoE/Q0B9pQPdESBuGWf8PRHudkFPbAcjQedMq516IZ67SaJAww/fKkHBB/Kvfcjck 9dJZvpSfyrEnPN5YuRX7giecTXFlZnZXkJ1vY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=37datdXl0TF4cHt39unBvjQQpavQ7FoeHgZeTkd6cVo=; b=oxAwQNMJ36fukEqoR2TsSmOqnCbmfKIr3WyCwcMo3B0bxF0pgt0CMiR9XWkpKr4hT3 jmatRguw4B8XNHEzNNYL/7w99dUfJ47Pm1gmh3FTLtYnDmGHFH+COK67gjBXFG65Thxu scr7deSJ26u025HKhFMY04ynNFio44i+oLm2zUFSvPPi7szhnLaC08CiUEwZnfEYUHGP IosUBI6upUsfsj92PK0a/qqjKenbm2rdPU3vuOFwz1wU++3RSIokkpEyX0Ub7uT70RXF /6VrJe6WdPk+VHAL2UJ85pLcp+BhOz3/fVo9fPZkcLYxsA0iZU3kW3yYK63Wad1YsOnq vDmQ== X-Gm-Message-State: AOAM530uWEQWqAwMpfNfR/raH2JnqKkZYdYx8XkHbPVuHsnKmMlxCyxe +lxxbvBHuT2TvHIkVI83ipCsPmuY3iNZpoguKrmdtw== X-Received: by 2002:a0c:aed6:: with SMTP id n22mr1149105qvd.70.1591612626754; Mon, 08 Jun 2020 03:37:06 -0700 (PDT) MIME-Version: 1.0 References: <20200311112004.47138-1-stevensd@chromium.org> <20200311112004.47138-5-stevensd@chromium.org> <20200513123326-mutt-send-email-mst@kernel.org> <20200608054234-mutt-send-email-mst@kernel.org> In-Reply-To: <20200608054234-mutt-send-email-mst@kernel.org> From: David Stevens Date: Mon, 8 Jun 2020 19:36:55 +0900 Message-ID: Subject: Re: [PATCH v3 4/4] drm/virtio: Support virtgpu exported resources To: "Michael S. Tsirkin" Cc: Gerd Hoffmann , David Airlie , Daniel Vetter , Jason Wang , Sumit Semwal , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , open list , ML dri-devel , "open list:VIRTIO GPU DRIVER" , Linux Media Mailing List , "moderated list:DMA BUFFER SHARING FRAMEWORK" , virtio-dev@lists.oasis-open.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 8, 2020 at 6:43 PM Michael S. Tsirkin wrote: > > On Fri, May 15, 2020 at 04:26:15PM +0900, David Stevens wrote: > > > > + if (virtio_has_feature(vgdev->vdev, VIRTIO_GPU_F_RESOURCE_UUID)) { > > > > + vgdev->has_resource_assign_uuid = true; > > > > + } > > > > > > > > > Just a question: this relies on DMA bufs so I assume it is > > > not really assumed to work when DMA API is bypassed, right? > > > Rather than worry what does it mean, how about just > > > disabling this feature without PLATFORM_DMA for now? > > > > By PLATFORM_DMA, do you mean CONFIG_DMA_SHARED_BUFFER? > > Sorry, no. I mean VIRTIO_F_IOMMU_PLATFORM which in the > future will be renamed to VIRTIO_F_PLATFORM_ACCESS. Shouldn't things work independent of whether or not that feature is set? If a virtio driver properly uses the dma_buf APIs (which virtgpu seems to), then that should take care of any mapping/synchronization related to VIRTIO_F_IOMMU_PLATFORM. If anything, the case where VIRTIO_F_IOMMU_PLATFORM isn't set is easier, since then we know that the "the device has same access [sic] to memory addresses supplied to it as the driver has", according to the specification. -David