Received: by 10.223.185.116 with SMTP id b49csp2296300wrg; Mon, 12 Feb 2018 07:30:37 -0800 (PST) X-Google-Smtp-Source: AH8x224V7AawGXBBmA31ogec0USukK6tnPuugygPIQXMq2jVbN7fgWY1Her1thduEZWTdy1nvo5Z X-Received: by 10.99.1.70 with SMTP id 67mr9673294pgb.23.1518449437821; Mon, 12 Feb 2018 07:30:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518449437; cv=none; d=google.com; s=arc-20160816; b=BDrg/hN9e2BzYxihIAPO6fDxEKWts3chX27d71W3YtMpF2qiu/3M4AikkMS4QUZT9V CUFVaxCQ2WrhN8dTGs+C8CniB4gkTmUBIcEMwKKctpXAAyc4Olr7juRJaw61dJxAIXVX yzbb/muEw2EXvOOr/HC2bo5qyrmzcnHs5X3tSnWNACPFJlm3jW3h4p3ZZPqJxIZOs1cc SiE8zuvqkGY5IxQR5sXzPks26ryDJchaaX+nSBHLw8ZZ6ehtKdrfHc5KLtP5RVezXDfY hnuSraVhVx+M7cz3JW515BYTQjQG1VrbrP248+N9KqU7hP1Q3XhpzCTVo88JOUHOZ0zJ 49/Q== 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=e4bxpwyAmwbF7emYSXwuDfrHiPUghrhBhKfM31rzKn0=; b=qEoOFWVc9+wvGAmlqd1YhzIYCSrgWZOjPI00D3I+uI7ikEF6FO+EqcvQYsqt/qaEk7 V68E+02s+UwjtRRMhZW0KAYnI2ZzkQefJEXKCT4vBtWNroo5EcxXBW7mJgBiibyQC/rJ vLMKpl8vOT/0Ytmf3u7ujeyhO2y4xeXALGLz4DNmrODA/BaDMH7zayhcB2IBtW9HpLbA WY5ZF/+cLgzOMd5CNcR+U0ZOAsZn9t+GEv14GgOwtmX7q9hZScqzekDkXKx3xwNymfCn 8u5+QEC6EzBO76P+l9X6Eres0l1uQqkAO1FdGga72wMQouBo6X4J3eL3dhgGEjvJ+NnU N4FA== 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 b2si3733737pgc.726.2018.02.12.07.30.20; Mon, 12 Feb 2018 07:30:37 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753471AbeBLP3I (ORCPT + 99 others); Mon, 12 Feb 2018 10:29:08 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:46682 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752720AbeBLP3G (ORCPT ); Mon, 12 Feb 2018 10:29:06 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 97C3F40201A0; Mon, 12 Feb 2018 15:29:05 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-147.ams2.redhat.com [10.36.116.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id 49A7C2026612; Mon, 12 Feb 2018 15:29:04 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6892731FFF; Mon, 12 Feb 2018 16:29:03 +0100 (CET) Date: Mon, 12 Feb 2018 16:29:03 +0100 From: Gerd Hoffmann To: Tomeu Vizoso 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 Subject: Re: [PATCH v3 1/2] drm/virtio: Add window server support Message-ID: <20180212152903.24t6sdgthg2aptnn@sirius.home.kraxel.org> References: <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> <6cf0c06a-b884-3251-166b-6ff3dec3ebc7@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6cf0c06a-b884-3251-166b-6ff3dec3ebc7@collabora.com> User-Agent: NeoMutt/20171215 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 12 Feb 2018 15:29:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Mon, 12 Feb 2018 15:29:05 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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 > > 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. Place the buffer description into the wayland extension protocol messages? i.e. have some wl_virt_proxy protocol extension. Then, for the stdvga case: (1) client sends wl_drm/create_prime_buffer request to the guest proxy (2) guest proxy rewrites this into wl_virt_proxy/create_buffer, or maybe a create_stdvga_buffer request, carrying all the information listed above, and sends it to the host proxy. (3) host proxy rewrites it again into a wl_shm_pool/create_buffer and forwards it to the server. cheers, Gerd