Received: by 10.223.185.116 with SMTP id b49csp2263599wrg; Mon, 12 Feb 2018 07:03:28 -0800 (PST) X-Google-Smtp-Source: AH8x224AvJNdpe8JU0q1Ex5nP/tpl9GiIdXQc7Zl/AxJfEYOy7S6KQHb3DbmG4oZ2HrjYr1YiUDI X-Received: by 10.98.204.75 with SMTP id a72mr11922616pfg.33.1518447808550; Mon, 12 Feb 2018 07:03:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518447808; cv=none; d=google.com; s=arc-20160816; b=g2mBvJqR/9pBMlRzROaTBY2pKhWmTK9Gey2smXD+lhqOFkW6FpYVcrOXE4vq6YY+oZ tHQVRbnIqYTZowS+v63osCjmZ89n2BUQhWC0WP8q1xkX24WRJ8siBHARaNq126LTnFdg YpHKO3CC8jX4UaPFKuHz6Cx9lNuSNOq5kN0UsSUcvZza64i23M66MqHT96Ytdi5WqaII 3YXU/FTop4C9G5p5eF5KcVazASIWJCwGtr+aeqqPXKh4Mzjrq5FFMsXYFRt0bV4E2/45 mIgkAeWdOM+Km5su0/FL6b+rLORF/pKQNOb8cEiYmxpMSEvS0QFJ8fs8CAHtJuSblcK/ ajFg== 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=K+PpR0P2EIqdDdE6mB15hrUdrNocDzolR77Uqm78Rgc=; b=p1wKmmZ7/C7MO5O4c/wZFX7IiWg5lj2WavxruitSjaejZR/Fgu3j3YordH03YNwp4K klpGWp5DX7tyuVXmKcN7NR8ODqMpbEfubFr0J9hvkVfsBmsW3KBdRuafSsCCte0QT+bw JsTclx7QbOKQ5dpoyBuJvqFgftW8PQ/YvQoQMpjvswi1FyIIy5jc1R7jt4uQdpn6VpGV jCGrQG4itQghof2MfVlrqbEKnRdKelTUZxdk79DLhpnDmPH/dZMlN06MSsz3BRAwjkFZ PBeCE7u4N6Ak+NqxzRoX27fEyGAH+D0yqBADRL1+gqY0gRunDMZCUlRtJLRUroruDep2 cD9A== 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 r2si471688pgv.485.2018.02.12.07.03.05; Mon, 12 Feb 2018 07:03:28 -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 S1754239AbeBLOmn (ORCPT + 99 others); Mon, 12 Feb 2018 09:42:43 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39814 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754224AbeBLOmm (ORCPT ); Mon, 12 Feb 2018 09:42:42 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tomeu) with ESMTPSA id 60A4A2705D6 Subject: Re: [PATCH v3 1/2] drm/virtio: Add window server support To: Gerd Hoffmann Cc: linux-kernel@vger.kernel.org, Zach Reizner , kernel@collabora.com, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, "Michael S. Tsirkin" , David Airlie , Jason Wang , Stefan Hajnoczi References: <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> <04687943-847b-25a7-42ef-a21b4c7ef0cf@collabora.com> <38880e66-b676-1170-c2ca-5a5603c5b521@collabora.com> <20180212115242.z3qv5uejbnhgvd6o@sirius.home.kraxel.org> <20180212142730.g2646v77qsvzd5ff@sirius.home.kraxel.org> From: Tomeu Vizoso Message-ID: <6cf0c06a-b884-3251-166b-6ff3dec3ebc7@collabora.com> Date: Mon, 12 Feb 2018 15:42:37 +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: <20180212142730.g2646v77qsvzd5ff@sirius.home.kraxel.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/12/2018 03:27 PM, Gerd Hoffmann wrote: > On Mon, Feb 12, 2018 at 03:00:24PM +0100, Tomeu Vizoso wrote: >> On 02/12/2018 12:52 PM, Gerd Hoffmann wrote: >>> Hi, >>> >>>> can we reach agreement on whether vsock should be involved in this? >>> >>> I think the best approach would be to have guest proxy and host proxy >>> use vsock for the wayland protocol. Use a wayland protocol extension to >>> reference the buffers in stdvga / ivshmem / virtio-gpu. Only the two >>> proxies need to understand the extension, the client <=> guest proxy and >>> host proxy <=> server communication would be standard wayland protocol. >> >> Thanks for the ideas. What I haven't understood yet is how you see the >> actual passing of buffers via vsock. Are you thinking of using ancillary >> data to pass FDs, or something else? > > I was more thinking about a struct containing enough info to allow the > proxy on the host side find the buffer, something like: > > struct { > enum type { stdvga, virtio-cpu, ... } > pcislot device; > union { > int stdvga_pcibar_offset; > int virtio_gpu_resource_id; > } > } > > So when the guest proxy gets a message with a fd referencing a buffer it > would have to figure where the buffer is, rewrite the message into the > struct above for the host proxy. The host proxy would rewrite the > message again for the server. What I don't understand yet is how we can keep the buffer descriptions together with the protocol data that references them. With SCM_RIGHTS, the FDs are placed in the ancillary data that "travels" together with the protocol data that references them. With the present series, the DRM_IOCTL_VIRTGPU_WINSRV_TX ioctl struct has a field for the protocol data and an array of FDs. How are you proposing to pass instances of that struct from above along the protocol data that refers to them? Thanks, Tomeu