Received: by 10.223.176.5 with SMTP id f5csp337601wra; Tue, 6 Feb 2018 23:42:46 -0800 (PST) X-Google-Smtp-Source: AH8x2253oTg/V7m/06gd2vtL6Rwstwb4NzBvqDGd8W74ZUt0jrMMlqTq94xRYPt9LcPMCri0wlnW X-Received: by 10.101.80.7 with SMTP id f7mr4247845pgo.35.1517989366717; Tue, 06 Feb 2018 23:42:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517989366; cv=none; d=google.com; s=arc-20160816; b=e8ngB7mfI7PeDvyS6eacrsM6iX1T5VHpgJEHzgJHQ/H3QaTUlxMtzS6JwQNSoaDfB7 F6eVex8NvFKmrFoyS4K0uRzV30RZwWd/V8v6BJf469f2pqvX5pf4ZG0Tsimoh+QDCkUq HVHwUoWB27ibBy8OXAi/uKA9CakeEJK5PdzuZzW7UY/y4onELJgMr5C9OEFPmgusZzOx eTfT+Yp4wg9jrljgqqSr0ooLptK+rs2vyzUZewtjUGgp7o1kp+h44Am5My1hRUm6uFGl mY1eBz59ZmF5Z44NUpWE9Dq/RpPkREbPcqC64kW6jdwQYJqq0P+BMTxDlJAywUTAijyW qFKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=Vt8ajofb85rIHKPZ4R135kPB2ugknoJjkCUlqjFr+9Q=; b=ptBdhTZCc6dxQO53Rx660JftImwtMW3adsX7Qoc8mPerrZr60hwtlfJsCTvWwoNlef FhljRHz1pLu620vqkoeuvz6cSrk0cjU4Ca0pcn7GUVyaYXDHZijBhlA/K3Jb+ZyHTdCU sg0F4uPLHId4Vc498o2izNwniDp3GlXGPhwxKy0lbokSoPPTv62LnTs2VdmA80RM9X7d 5pcLR1RSOhdRrEOcAtnGAwI0ZkBQ7RwjyxAujNyUO+2MIoI5GpkjIMYU63Fmu3oFTakg +bY6uEYCtXEH4MBmKdJZ9dtCRP3jgKtfaNujPibnvqGpPZlYWKtp7IhWUalgJDHlpHnF 26LQ== 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=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8-v6si691562plh.559.2018.02.06.23.42.32; Tue, 06 Feb 2018 23:42:46 -0800 (PST) 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753439AbeBGHlx (ORCPT + 99 others); Wed, 7 Feb 2018 02:41:53 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:37928 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753147AbeBGHlw (ORCPT ); Wed, 7 Feb 2018 02:41:52 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tomeu) with ESMTPSA id CC787273602 Subject: Re: [PATCH v3 1/2] drm/virtio: Add window server support To: "Michael S. Tsirkin" , Gerd Hoffmann Cc: linux-kernel@vger.kernel.org, Zach Reizner , kernel@collabora.com, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, David Airlie , Jason Wang , Stefan Hajnoczi References: <20180126135803.29781-1-tomeu.vizoso@collabora.com> <20180126135803.29781-2-tomeu.vizoso@collabora.com> <20180201163623.5cs2ysykg5wgulf4@sirius.home.kraxel.org> <49785e0d-936a-c3b4-62dd-aafc7083a942@collabora.com> <20180205122017.4vb5nlpodkq2uhxa@sirius.home.kraxel.org> <20180205160322.sntv5uoqp5o7flnh@sirius.home.kraxel.org> <20180206142302.vdjyqmnoypydci4t@sirius.home.kraxel.org> <20180207030636-mutt-send-email-mst@kernel.org> From: Tomeu Vizoso Message-ID: <1b7ff044-23c8-1bf7-004e-dd6ea1a7006e@collabora.com> Date: Wed, 7 Feb 2018 08:41:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180207030636-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/07/2018 02:09 AM, Michael S. Tsirkin wrote: > On Tue, Feb 06, 2018 at 03:23:02PM +0100, Gerd Hoffmann wrote: >>> Creation of shareable buffer by guest >>> ------------------------------------------------- >>> >>> 1. Client requests virtio driver to create a buffer suitable for sharing >>> with host (DRM_VIRTGPU_RESOURCE_CREATE) >> >> client or guest proxy? >> >>> 4. QEMU maps that buffer to the guest's address space >>> (KVM_SET_USER_MEMORY_REGION), passes the guest PFN to the virtio driver >> >> That part is problematic. The host can't simply allocate something in >> the physical address space, because most physical address space >> management is done by the guest. All pci bars are mapped by the guest >> firmware for example (or by the guest OS in case of hotplug). >> >>> 4. QEMU pops data+buffers from the virtqueue, looks up shmem FD for each >>> resource, sends data + FDs to the compositor with SCM_RIGHTS > > If you squint hard, this sounds a bit like a use-case for vhost-user-gpu, does it not? Can you extend on what makes you think that? As an aside, crosvm runs the virtio-gpu device in a separate, jailed process, among other virtual devices. https://chromium.googlesource.com/chromiumos/platform/crosvm/ Regards, Tomeu