From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: kvm@vger.kernel.org, "Stefan Hajnoczi" <stefanha@gmail.com>,
"Zach Reizner" <zachr@google.com>,
"Helen Mae Koike Fornazier" <helen.koike@collabora.co.uk>,
"David Airlie" <airlied@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@gmail.com>
Subject: Re: passing FDs across domains
Date: Tue, 14 Nov 2017 15:01:48 +0100 [thread overview]
Message-ID: <33a3c022-6c53-4e9c-e999-2caefde3e8fb@collabora.com> (raw)
In-Reply-To: <20171114093337.hxz4uvnimets2ca6@sirius.home.kraxel.org>
On 11/14/2017 10:33 AM, Gerd Hoffmann wrote:
> Hi,
>
> [ Cc'ing David Airlie and Marc-André Lureau ]
>
>>> Lets step back and look at the problem you are trying to solve.
>>>
>>> It seems you want guest wayland applications appear seamless on the host
>>> wayland server, correct?
>>
>> Correct.
>>
>>> How does the wayland rendering workflow look like? As far I know the
>>> wayland protocol doesn't include any rendering. Rendering happens
>>> client side, into some buffer (one per window), which is then passed to
>>> the server for display compositing. Correct? So you basically want
>>> pass that buffer from guest to host?
>>
>> Correct.
>>
>>> What kind of shared memory is used by wayland?
>>> sysv shm? gbm buffers / dmabufs?
>>
>> Typically, shared memory for CPU-rendered content, and dmabufs for
>> GPU-rendered content.
>
> Ok. I guess solving this for virtio-gpu (with virgl enabled) is easiest
> then. Due to opengl rendering being offloaded to the host gpu the
> guest window content already is in a host gpu buffer.
Yes, besides, we already have virtio-gpu in place which can be improved
as needed.
I'm more worried about CPU-rendered buffers, as the client is just
putting in the socket the output of shm_open or similar. There I don't
see any easy solution which is why I tried to get more "creative".
Thanks,
Tomeu
> So we "only" need to export that buffer as dmabuf and pass it to the
> wayland server. That still doesn't look trivial though. qemu must
> manage the dmabufs, so it must be involved somehow; a direct guest
> client -> host server wayland connection (alone) will not work.
>
> I think we need either a wayland proxy in qemu which rewrites the buffer
> references, or the host wayland server must talk to both guest client
> (vsock could work for that) and qemu (for dmabuf management). Or some
> mixed model, such as a separate wayland proxy server talking to qemu for
> dmabuf management.
>
> I suspect in any case we need a wayland protocol extension for a new
> buffer type as passing buffer references from guest to host can't use
> filehandles.
>
> cheers,
> Gerd
>
next prev parent reply other threads:[~2017-11-14 14:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 14:18 passing FDs across domains Tomeu Vizoso
2017-11-14 8:02 ` Gerd Hoffmann
2017-11-14 8:08 ` Tomeu Vizoso
2017-11-14 9:33 ` Gerd Hoffmann
2017-11-14 14:01 ` Tomeu Vizoso [this message]
2017-11-14 14:19 ` Gerd Hoffmann
2017-11-15 8:21 ` Tomeu Vizoso
2017-11-15 9:47 ` Tomeu Vizoso
2017-11-16 9:57 ` Tomeu Vizoso
2017-11-16 10:49 ` Gerd Hoffmann
2017-11-16 14:36 ` Tomeu Vizoso
2017-11-16 15:51 ` Gerd Hoffmann
2017-11-22 10:54 ` Stefan Hajnoczi
2017-11-22 15:47 ` Stefan Hajnoczi
2017-11-23 8:17 ` Tomeu Vizoso
2017-11-27 10:59 ` Stefan Hajnoczi
2017-11-27 11:59 ` cross-domain Wayland (Re: passing FDs across domains) Tomeu Vizoso
[not found] ` <bf6ce187-46b6-f01d-4eba-79b035c94426@collabora.com>
[not found] ` <CAAFQd5AJFtK524sh1RStOeE8yagknW_hoJVr6mzMXb=+eL03Bg@mail.gmail.com>
[not found] ` <20190320121132.ysny44krkgw6jlje@sirius.home.kraxel.org>
[not found] ` <CAAFQd5BmAfYzF0JprqWjpkmk-_PGAGXzy7HOa-QJJBxfqigVkg@mail.gmail.com>
[not found] ` <20190401161940.c32mxs7locfzlp6z@sirius.home.kraxel.org>
2019-04-16 5:29 ` passing FDs across domains Tomasz Figa
2019-04-17 9:30 ` Gerd Hoffmann
2019-04-17 10:12 ` Tomasz Figa
2019-04-18 6:56 ` Tomasz Figa
2019-04-18 7:07 ` Lepton Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33a3c022-6c53-4e9c-e999-2caefde3e8fb@collabora.com \
--to=tomeu.vizoso@collabora.com \
--cc=airlied@redhat.com \
--cc=helen.koike@collabora.co.uk \
--cc=kraxel@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=marcandre.lureau@gmail.com \
--cc=stefanha@gmail.com \
--cc=zachr@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox