Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp291078imm; Fri, 31 Aug 2018 00:06:33 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbEEIYfv2ebH4j9XDPFFmlYWRGboxM3zHJjIaZfRdhEd1BV50Y2MF263+3EXbyjKp7+Gz3G X-Received: by 2002:a63:5d1c:: with SMTP id r28-v6mr13113211pgb.445.1535699193532; Fri, 31 Aug 2018 00:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535699193; cv=none; d=google.com; s=arc-20160816; b=oJR4prwthU0+ikETo1X1J6u6Tr65aFgOWxjcHQykGV69cIHropyjQ0sELucEC8Jgb4 5ZJ8AQD/l59VrnBd2POIeRFapZWikC2OfRb2r5aBQOrSYiFRkwRjAwxcUih0bBBQ7O8c 8xHqz67tqxx6nHBaldTzTmEYm82RBKOAYSL2JWNsdX7dt+q6G0RIY+vGrTuP8JzgbfP2 xb5+QILv2JBnA0GlJbwr3Squo54Hf7QP26D5irY0b4lqcRKJKCvC54vNc1BHdAU+fy4c OfqgAm9iKmLZ99LD1yNPjesHYuiWSvMMk8tPVVN9uqmRvoYC3ITjA/HOPtvxuqAnTFqG ubfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=tTqr0kQ+4/hwDbEAk9fd/NVMZM2deyNUWvAEXZPxKx4=; b=cTCZhIqKUPawzUXRvtxtSQYOljPUNtFFsXZFGRJHEhj5QaKOxtPyjiFo4d4fiu3OPs tT9KErg3oC5sAniUrZwFAwnvr/laXqSrefEEDShmPYLtebuWdagHWukYZo+dyQbPtNhZ C8jp3nCt3NycJHYetHXeHheSXePaG9o4XankuCA5ycL+9RyoMJ1+QYU3/DmPJMxcM291 hE/QBESW07z2inM+AnHnBy+gANeb3AzxhczsA6+WdhhmcfOaVsFCLQ4xBk12T1WpV+78 qBhjxhgdnSR8MtJ0R8EbYFdBORPYyuXHjlvhSOy+rckxxb9Pu0NDO5AUaxa8BIWfks7y skZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t19-v6si8054695pgu.285.2018.08.31.00.06.18; Fri, 31 Aug 2018 00:06:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727292AbeHaLK2 (ORCPT + 99 others); Fri, 31 Aug 2018 07:10:28 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55702 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727177AbeHaLK2 (ORCPT ); Fri, 31 Aug 2018 07:10:28 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9A98940200A8; Fri, 31 Aug 2018 07:04:26 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-224.ams2.redhat.com [10.36.116.224]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA5201C5AB; Fri, 31 Aug 2018 07:04:25 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0345511AA4; Fri, 31 Aug 2018 09:04:25 +0200 (CEST) Date: Fri, 31 Aug 2018 09:04:24 +0200 From: Gerd Hoffmann To: Tomeu Vizoso Cc: dri-devel@lists.freedesktop.org, David Airlie , Laurent Pinchart , Jonathan Corbet , Sumit Semwal , Shuah Khan , "open list:DOCUMENTATION" , open list , "open list:DMA BUFFER SHARING FRAMEWORK" , "moderated list:DMA BUFFER SHARING FRAMEWORK" , "open list:KERNEL SELFTEST FRAMEWORK" , Zach Reizner , Daniel Stone Subject: Re: [PATCH v6] Add udmabuf misc device Message-ID: <20180831070424.3xoxfy54vyxbdfzd@sirius.home.kraxel.org> References: <20180703075359.30349-1-kraxel@redhat.com> <20180703083757.GG7880@phenom.ffwll.local> <20180704055338.n3b7oexltaejqmcd@sirius.home.kraxel.org> <9818b301-9c9d-c703-d4fe-7c2d4d43ed66@collabora.com> <20180704080005.juutrwri4kxm7yim@sirius.home.kraxel.org> <06d8aa8d-5eac-64e2-f21e-43fe7ca96cc2@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06d8aa8d-5eac-64e2-f21e-43fe7ca96cc2@collabora.com> User-Agent: NeoMutt/20180622 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 31 Aug 2018 07:04:26 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 31 Aug 2018 07:04:26 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > qemu can use memfd to allocate guest ram. Now, with the help of > > udmabuf, qemu can create a *host* dma-buf for the *guest* graphics > > buffer. > > Guess each physical address in the iovec in > VIRTIO_GPU_CMD_RESOURCE_ATTACH_BACKING can be passed as the offset in the > udmabuf_create_item struct? Exactly. https://git.kraxel.org/cgit/qemu/commit/?h=sirius/udmabuf&id=515a5b9f1215ea668a992e39d66993a17a940801 > Are you thinking of anything else besides passing the winsrv protocol across > the guest/host boundary? Just wondering if I'm missing something. The patch above uses the dmabuf internally in qemu. It simply mmaps it, so qemu has a linear representation of the resource and can use it as pixman image backing storage without copying the pixel data. So it is useful even without actually exporting the dmabuf to other processes. cheers, Gerd PS: Any chance you can review the v7 patch?