All of lore.kernel.org
 help / color / mirror / Atom feed
* [virtio-dev] virtio-input for copy/paste?
@ 2020-08-10 16:41 Dr. David Alan Gilbert
  2020-08-17  5:15 ` [virtio-dev] " Gerd Hoffmann
  0 siblings, 1 reply; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2020-08-10 16:41 UTC (permalink / raw)
  To: virtio-dev, kraxel; +Cc: berrange

Hi,
  Is there anywhere that virtio has where host/guest copy/paste would
fit?   I don't think it's something we have defined at the moment
and I was wondering if virtio-input would be the right place to add it.
If the client driver supported the feature then the host would
hand it to the client, if it didn't it could insert a string
of key events.

  It probably needs some design to ensure that whatever we have
would work with existing guests and existing transports like VNC.

Dave

-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [virtio-dev] Re: virtio-input for copy/paste?
  2020-08-10 16:41 [virtio-dev] virtio-input for copy/paste? Dr. David Alan Gilbert
@ 2020-08-17  5:15 ` Gerd Hoffmann
  2020-08-19 15:35   ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2020-08-17  5:15 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: virtio-dev, berrange

On Mon, Aug 10, 2020 at 05:41:13PM +0100, Dr. David Alan Gilbert wrote:
> Hi,
>   Is there anywhere that virtio has where host/guest copy/paste would
> fit?

Well, spice supports it, with spice client and spice guest agent talking
to each other using a virtio-serial channel (guest <-> spice-server) and
a spice protocol tunnel (spice-server <-> spice-client).

You'll need a guest agent anyway, to bridge between window system
(x11/wayland/...) and device, so running some protocol over a stream
doesn't look bad to me as design choice.  These days you might choose
vsock instead (depends on how you design the host side though).

You also need the agent as user interface, so the user can explicitly
enable clipboard access for the other side (you don't want do this
automatically for security reasons: the guest should not be able to
sniff the passwords which you cut+paste on the host from password
manager to browser).

> I don't think it's something we have defined at the moment
> and I was wondering if virtio-input would be the right place to add it.
> If the client driver supported the feature then the host would
> hand it to the client, if it didn't it could insert a string
> of key events.

The problem with such a fallback is keyboard maps.  virtio-input sends
scancodes not keysyms.  Even with us-ascii this is a problem (querty vs.
quertz), and it doesn't become easier with € æ ä ß and emoji ...

take care,
  Gerd


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [virtio-dev] Re: virtio-input for copy/paste?
  2020-08-17  5:15 ` [virtio-dev] " Gerd Hoffmann
@ 2020-08-19 15:35   ` Dr. David Alan Gilbert
  2020-08-20  5:32     ` Gerd Hoffmann
  0 siblings, 1 reply; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2020-08-19 15:35 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: virtio-dev, berrange

* Gerd Hoffmann (kraxel@redhat.com) wrote:
> On Mon, Aug 10, 2020 at 05:41:13PM +0100, Dr. David Alan Gilbert wrote:
> > Hi,
> >   Is there anywhere that virtio has where host/guest copy/paste would
> > fit?
> 
> Well, spice supports it, with spice client and spice guest agent talking
> to each other using a virtio-serial channel (guest <-> spice-server) and
> a spice protocol tunnel (spice-server <-> spice-client).

Right; what I was interested in was whether there would be a way to
plumb copy/paste through for a VNC or local Gtk display; the guest view
should be independent of the transport protocol.

Perhaps that way is just to standardise on the virtio-serial channel
that spice already uses and provide that for other transports;
but if not then it feels like there should be some standard.

> You'll need a guest agent anyway, to bridge between window system
> (x11/wayland/...) and device, so running some protocol over a stream
> doesn't look bad to me as design choice.  These days you might choose
> vsock instead (depends on how you design the host side though).
> 
> You also need the agent as user interface, so the user can explicitly
> enable clipboard access for the other side (you don't want do this
> automatically for security reasons: the guest should not be able to
> sniff the passwords which you cut+paste on the host from password
> manager to browser).

That should be on the host side-UI shouldn't it?

> > I don't think it's something we have defined at the moment
> > and I was wondering if virtio-input would be the right place to add it.
> > If the client driver supported the feature then the host would
> > hand it to the client, if it didn't it could insert a string
> > of key events.
> 
> The problem with such a fallback is keyboard maps.  virtio-input sends
> scancodes not keysyms.  Even with us-ascii this is a problem (querty vs.
> quertz), and it doesn't become easier with € æ ä ß and emoji ...

Yeh tricky.

Dave

> take care,
>   Gerd
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [virtio-dev] Re: virtio-input for copy/paste?
  2020-08-19 15:35   ` Dr. David Alan Gilbert
@ 2020-08-20  5:32     ` Gerd Hoffmann
  2020-08-20  7:50       ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2020-08-20  5:32 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: virtio-dev, berrange

  Hi,

> Right; what I was interested in was whether there would be a way to
> plumb copy/paste through for a VNC or local Gtk display; the guest view
> should be independent of the transport protocol.

Well.  Full-blown cut+paste is quite complex.  spice goes all-in and
supports cut+paste everything both ways.  The minimal thing would be
host -> guest support for "text/plain; charset=utf-8".  Quick google
search suggests the vnc protocol supports just that.

So, what exactly we are talking about?

> Perhaps that way is just to standardise on the virtio-serial channel
> that spice already uses and provide that for other transports;
> but if not then it feels like there should be some standard.

Not that easy I think, the channel is not used exclusively for
cut+paste but also some other, spice-specific stuff.

We could try integrate this into qemu guest agent.

Or use something completely separate.  qemu guest agent works at system
level whereas cut+paste would work on user session level.  spice solves
this by having both system and user daemon, where the user daemon talks
to the system daemon.  With a separate channel you wouldn't need the
system daemon as middle man though.

> > You also need the agent as user interface, so the user can explicitly
> > enable clipboard access for the other side (you don't want do this
> > automatically for security reasons: the guest should not be able to
> > sniff the passwords which you cut+paste on the host from password
> > manager to browser).
> 
> That should be on the host side-UI shouldn't it?

Guest UI too (you can make the same argument the other way around) if we
want support guest->host cut+paste.

take care,
  Gerd


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [virtio-dev] Re: virtio-input for copy/paste?
  2020-08-20  5:32     ` Gerd Hoffmann
@ 2020-08-20  7:50       ` Dr. David Alan Gilbert
  2020-08-20  8:22         ` Gerd Hoffmann
  0 siblings, 1 reply; 6+ messages in thread
From: Dr. David Alan Gilbert @ 2020-08-20  7:50 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: virtio-dev, berrange

* Gerd Hoffmann (kraxel@redhat.com) wrote:
>   Hi,
> 
> > Right; what I was interested in was whether there would be a way to
> > plumb copy/paste through for a VNC or local Gtk display; the guest view
> > should be independent of the transport protocol.
> 
> Well.  Full-blown cut+paste is quite complex.  spice goes all-in and
> supports cut+paste everything both ways.  The minimal thing would be
> host -> guest support for "text/plain; charset=utf-8".  Quick google
> search suggests the vnc protocol supports just that.
> 
> So, what exactly we are talking about?

Yes I saw VNC supports some of this; but consider a qemu started
with -vnc  and it's remotely displaying - I don't think we wire up VNC's
copy/paste in qemu to give anything to the guest, because we've
got nothing in the guest to present it as - which is what I was trying
to add.

> > Perhaps that way is just to standardise on the virtio-serial channel
> > that spice already uses and provide that for other transports;
> > but if not then it feels like there should be some standard.
> 
> Not that easy I think, the channel is not used exclusively for
> cut+paste but also some other, spice-specific stuff.
> 
> We could try integrate this into qemu guest agent.
> 
> Or use something completely separate.  qemu guest agent works at system
> level whereas cut+paste would work on user session level.  spice solves
> this by having both system and user daemon, where the user daemon talks
> to the system daemon.  With a separate channel you wouldn't need the
> system daemon as middle man though.
> 
> > > You also need the agent as user interface, so the user can explicitly
> > > enable clipboard access for the other side (you don't want do this
> > > automatically for security reasons: the guest should not be able to
> > > sniff the passwords which you cut+paste on the host from password
> > > manager to browser).
> > 
> > That should be on the host side-UI shouldn't it?
> 
> Guest UI too (you can make the same argument the other way around) if we
> want support guest->host cut+paste.

OK, I was less worried about the host stealing from the guest, since it
normally already can.

Dave

> take care,
>   Gerd
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [virtio-dev] Re: virtio-input for copy/paste?
  2020-08-20  7:50       ` Dr. David Alan Gilbert
@ 2020-08-20  8:22         ` Gerd Hoffmann
  0 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2020-08-20  8:22 UTC (permalink / raw)
  To: Dr. David Alan Gilbert; +Cc: virtio-dev, berrange

  Hi,

> > Guest UI too (you can make the same argument the other way around) if we
> > want support guest->host cut+paste.
> 
> OK, I was less worried about the host stealing from the guest, since it
> normally already can.

Yes, typically that would less concerning.  I wouldn't completely ignore
it though, SEV exists for a reason.  Also you might not want cut+paste
inside the guest overwrite the host clipboard.

take care,
  Gerd


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-20  8:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-10 16:41 [virtio-dev] virtio-input for copy/paste? Dr. David Alan Gilbert
2020-08-17  5:15 ` [virtio-dev] " Gerd Hoffmann
2020-08-19 15:35   ` Dr. David Alan Gilbert
2020-08-20  5:32     ` Gerd Hoffmann
2020-08-20  7:50       ` Dr. David Alan Gilbert
2020-08-20  8:22         ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.