Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4458427ybg; Mon, 8 Jun 2020 08:19:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9UvG3VYnAo/PIiyc3pJhM/edbUSGFMrw5qcWmEky5lpx6B9A0e2vb3vbwuuSbFhkW3MR/ X-Received: by 2002:aa7:c41a:: with SMTP id j26mr22925782edq.13.1591629584485; Mon, 08 Jun 2020 08:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591629584; cv=none; d=google.com; s=arc-20160816; b=RgL4u019ASEN/zNfOv+jDqoSkFc8c0e+ffWVMBQHXiihQWmHhNuZ4TjvOMqkdFblTb MgnIysUfoFpYY+RcNrRQmBZHhahw6oxlqN7B/kro3ZemhagxE/bcbZEUGD1RcinfsVCf fP9KRuygxQz1sBPjOnzZlU/AiwluRxxy0HkN7174fCcAkKKiLKOwvhpYm4BW4xEBq6zg FI8+Tg+OZXCvXb0sc4CF8zeWyd2Zn+YIirKJJEhVB5k3LEb/nZSLZcvn99Y2ztbzEO8g mVDKQGWSeuWL7EFhJzpdWQFP97A+rGAfkAzAvY/mDfuIcBQBT8GqSzMtX8Thh4vhVAep VTnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=hGKEH1dhLlDad944CTVO7vApiXCC7og9k/LEAwnlxtw=; b=Ei6Rx8I4tajK3F1RRoIWz+WN9VZaID6b82sr/zIozifCCn4GXLoYJGARhnN5w13Iin tT2RPMGoRObyQY8njPW+Rqbl7sN4KcSw0KclH3KffsQBTs1Y7sqt6l/+hkXQwSyXbaeL 7e8LWw22adK1hgHpAUS8uASCokEV0m4q9sl75pdtNiSLoDKR6ec2S4fUf4ntTjww1d6r RA8cHMJh2ZI8HhJw4W0Y4EHWXHsyLYR6yNcZhvSLgZ7czj2li/WhwAo/zDHCrLerXN2N IxcziU1mdQi+gKR3uZcLy/+d1A1bt5LHCp+7H2eSyBIUh2RoW3gMa4YsKsxjp/nYBZ2g fJ6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=A8+gs2el; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w5si8729475edr.130.2020.06.08.08.19.20; Mon, 08 Jun 2020 08:19:44 -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=@redhat.com header.s=mimecast20190719 header.b=A8+gs2el; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729837AbgFHPRb (ORCPT + 99 others); Mon, 8 Jun 2020 11:17:31 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:55680 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728591AbgFHPR3 (ORCPT ); Mon, 8 Jun 2020 11:17:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591629447; 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: in-reply-to:in-reply-to:references:references; bh=hGKEH1dhLlDad944CTVO7vApiXCC7og9k/LEAwnlxtw=; b=A8+gs2el5RBoxqjjoc5bsJNPcn+wbSVtitbFs+5czDHk2bhCJA1o7BfrADa2YU3Z2qkzIu 8aYUIX1ttaQe87sJARGk8hVLidyj983HAzxuMKB06k/L1i6csTJ92MgD3izOVteq6RBjwb H3pf4b1jJPvS6TLNLFflT5GgI5x9Re8= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-26-XWoblf8NNfmnGtO4N4aFpQ-1; Mon, 08 Jun 2020 11:17:23 -0400 X-MC-Unique: XWoblf8NNfmnGtO4N4aFpQ-1 Received: by mail-wm1-f70.google.com with SMTP id g84so5370278wmf.4 for ; Mon, 08 Jun 2020 08:17:23 -0700 (PDT) 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=hGKEH1dhLlDad944CTVO7vApiXCC7og9k/LEAwnlxtw=; b=nLLI6niTxwDnNMHmp5zGjkOEVe0pEKNjXyi0jwNbr3t/F1lvhf4wUu1bBkYV9iDd+M TwOEx2tDXbjuv3U4a1leVJPyGuPRnHylbM/i4onW7YNEvikUVdVXCuP2QEjZZDEqOsd7 0vE1e9e667Jz6gF6zBC1vplbsSZb58HdBv87vyYprvtcDA6dUjGZjj34O5mMfyeIbc5e fMKQFfv2V3UeOaiiwkVHKEoP6m+QFvI/YzDz/BdmpR7mBFXIqyShIZ47jfYKxf2LGZCE EfNQr4pAcINF5CX+rRacL9AUlDL2QGbRUyWjsZdWOqC/fB72zzqOwOj/GGj6P7GXNwt7 xq0g== X-Gm-Message-State: AOAM5313safmoNUi6122Q0gOlkveKGSCf946jb3JMWx2zxJKLXd9HTCR maMfgG7O2puminqSwZVZMBaaqgBedsW/uFiD3BK5LTVRzYFcExSX1LuaIJl446SU2Nfv+DxTqSb ObSvBqgM0HMj0rn4KFhQHz63K X-Received: by 2002:adf:fdcc:: with SMTP id i12mr25340211wrs.313.1591629442406; Mon, 08 Jun 2020 08:17:22 -0700 (PDT) X-Received: by 2002:adf:fdcc:: with SMTP id i12mr25340181wrs.313.1591629442198; Mon, 08 Jun 2020 08:17:22 -0700 (PDT) Received: from redhat.com (bzq-109-64-41-91.red.bezeqint.net. [109.64.41.91]) by smtp.gmail.com with ESMTPSA id h29sm24085wrc.78.2020.06.08.08.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 08:17:21 -0700 (PDT) Date: Mon, 8 Jun 2020 11:17:18 -0400 From: "Michael S. Tsirkin" To: David Stevens 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 Subject: Re: [PATCH v3 4/4] drm/virtio: Support virtgpu exported resources Message-ID: <20200608111647-mutt-send-email-mst@kernel.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 08, 2020 at 07:36:55PM +0900, David Stevens wrote: > 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 I don't know much about drm so I can't tell, I was hoping Gerd can explain. -- MST