On Thu, 27 Feb 2020 01:22:11 -0800
Zach Reizner <za...@google.com> wrote:

> On Thu, Feb 27, 2020 at 1:09 AM Boris Brezillon
> <boris.brezil...@collabora.com> wrote:
> >
> > What's not entirely clear is whether we need to support cases where the
> > host create its own resources (without being asked by the guest) and
> > decides to pass them to a virtio-ipc-connection (through the unix <->
> > virtio-ipc bridge). If that's needed, we need interfaces to let host
> > apps import their resources in the VM (again, those interfaces are
> > likely to be resource-type dependent).  
> 
> When the wayland compositor sends the keyboard map or requests
> clipboard content, the compositor (or another client on the host) will
> create a resource (shm or pipe) and send it over the unix domain
> socket. Would this be a case of the above situation you mentioned
> above? It seems like we need to support the host creating resources
> passed over the virtio-ipc-connection.

Okay. There's also another problem I noticed just now: every time an FD
is passed on a unix socket a new FD is created on the receiver's side,
even if the receiver already has an opened-FD pointing to the exact
same file, which means we can't easily create an FD <-> virtio-resource
mapping on the host (there's this kcmp() [1] syscall, but it doesn't
seem to have a wrapper in glibc which is not a good sign, plus you need
to enable CONFIG_CHECKPOINT_RESTORE).

[1]http://man7.org/linux/man-pages/man2/kcmp.2.html

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org

Reply via email to