Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1241691

Summary: [RFE] add virtio-input support (ovirt) [implemented in 7.3 via platform bug 1231114]
Product: [oVirt] vdsm Reporter: Ademar Reis <areis>
Component: RFEsAssignee: Martin Tessun <mtessun>
Status: CLOSED WONTFIX QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: bugs, dyuan, jtomko, kraxel, lpeer, lsurette, mgoldboi, michal.skrivanek, mtessun, mzhan, srevivo, virt-bugs, ycui
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: sbonazzo: ovirt-4.3-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1231114 Environment:
Last Closed: 2019-01-03 12:49:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1231114    
Bug Blocks:    

Description Ademar Reis 2015-07-09 20:10:54 UTC
I was not sure which component to use for this, so I'm using ovirt-core... Please correct me if I'm wrong.


+++ This bug was initially created as a clone of Bug #1231114 +++

Description of problem:

qemu 2.4 got support for virtio input devices.
guest support (linux kernel) is present in kernel 4.1+.

libvirt should get support for these.

name "virtio-keyboard-device", bus virtio-bus
name "virtio-keyboard-pci", bus PCI
name "virtio-mouse-device", bus virtio-bus
name "virtio-mouse-pci", bus PCI
name "virtio-tablet-device", bus virtio-bus
name "virtio-tablet-pci", bus PCI

--- Additional comment from Gerd Hoffmann on 2015-06-17 11:47:13 BRT ---

https://www.kraxel.org/blog/2015/06/new-member-in-the-virtio-family-input-devices/

Comment 2 Yaniv Kaul 2016-10-23 07:11:03 UTC
What's the advantage of using them?

Comment 3 Michal Skrivanek 2016-10-24 10:40:07 UTC
get rid of USB tablet and keyboard we have today. Currently we have to have USB

Comment 4 Gerd Hoffmann 2016-10-26 08:50:39 UTC
(In reply to Yaniv Kaul from comment #2)
> What's the advantage of using them?

Drop USB emulation.

USB is expensive (in terms of cpu cycles), especially the older usb host adapters (uhci/ohci/ehci).

USB emulation is complex, so being able to drop this reduces the attack surface.

On x86 you can get away without usb already because you have the ps2 keyboard and can use spice agent instead of usb-tablet for mouse input events.

On ppc64 and aarch64 you'll need some keyboard though, and with virtio-keyboard you can drop usb-kbd (and usb-tablet for guests not using spice) together the usb host adapter.

While being at it (just to be sure, I think there is another bz for that already):  virtio-gpu support would be nice very useful too.  On aarch64 virtio-gpu is the only display adapter available.

Comment 5 Yaniv Kaul 2016-10-26 10:22:11 UTC
(In reply to Gerd Hoffmann from comment #4)
> (In reply to Yaniv Kaul from comment #2)
> > What's the advantage of using them?
> 
> Drop USB emulation.
> 
> USB is expensive (in terms of cpu cycles), especially the older usb host
> adapters (uhci/ohci/ehci).
> 
> USB emulation is complex, so being able to drop this reduces the attack
> surface.
> 
> On x86 you can get away without usb already because you have the ps2
> keyboard and can use spice agent instead of usb-tablet for mouse input
> events.

You theoretically can, practically you have the USB redirector, so you still keep USB emulation, no?

> 
> On ppc64 and aarch64 you'll need some keyboard though, and with
> virtio-keyboard you can drop usb-kbd (and usb-tablet for guests not using
> spice) together the usb host adapter.
> 
> While being at it (just to be sure, I think there is another bz for that
> already):  virtio-gpu support would be nice very useful too.  On aarch64
> virtio-gpu is the only display adapter available.

Is there remoting available for it?

Comment 6 Gerd Hoffmann 2016-10-26 10:39:10 UTC
> You theoretically can, practically you have the USB redirector, so you still
> keep USB emulation, no?

Yes, for usb redirection you still need usb emulation.
But IIRC usb redirection is a per-guest option in ovirt?

Also note that with no usb device connected the guest will shutdown all usb bus activity, so the emulation cpu cycles are still saved as long as usb redirection is not actively used.

> > While being at it (just to be sure, I think there is another bz for that
> > already):  virtio-gpu support would be nice very useful too.  On aarch64
> > virtio-gpu is the only display adapter available.
> 
> Is there remoting available for it?

virtio-gpu can operate in two modes: 2d (not accelerated) and 3d (virgl acceleration).  2d mode works remotely just fine, like any other qemu display adapter.  remote support for 3d/virgl mode is still WIP upstream.

Comment 7 Yaniv Kaul 2016-10-26 10:47:31 UTC
(In reply to Gerd Hoffmann from comment #6)
> > You theoretically can, practically you have the USB redirector, so you still
> > keep USB emulation, no?
> 
> Yes, for usb redirection you still need usb emulation.
> But IIRC usb redirection is a per-guest option in ovirt?

Yes, but do you expect the user to shutdown and restart the VM just to get it working? Michal - can you confirm?

> 
> Also note that with no usb device connected the guest will shutdown all usb
> bus activity, so the emulation cpu cycles are still saved as long as usb
> redirection is not actively used.
> 
> > > While being at it (just to be sure, I think there is another bz for that
> > > already):  virtio-gpu support would be nice very useful too.  On aarch64
> > > virtio-gpu is the only display adapter available.
> > 
> > Is there remoting available for it?
> 
> virtio-gpu can operate in two modes: 2d (not accelerated) and 3d (virgl
> acceleration).  2d mode works remotely just fine, like any other qemu
> display adapter.  remote support for 3d/virgl mode is still WIP upstream.

Michal - where do we stand on this?

Comment 8 Michal Skrivanek 2016-10-26 10:56:03 UTC
(In reply to Yaniv Kaul from comment #7)
> (In reply to Gerd Hoffmann from comment #6)
> > > You theoretically can, practically you have the USB redirector, so you still
> > > keep USB emulation, no?
> > 
> > Yes, for usb redirection you still need usb emulation.
> > But IIRC usb redirection is a per-guest option in ovirt?
> 
> Yes, but do you expect the user to shutdown and restart the VM just to get
> it working? Michal - can you confirm?

yes. I do expect to restart VMs like with all hw-related changes in new cluster level. And yes, for enabling/disabling usb redirection you would need to power cycle - it's enabled currently for all guests implicitly and "activated" by virt-viewer. Having an option to get rid of the USB stack is compelling to real-time, server, compute, non-VDI use cases

> 
> > 
> > Also note that with no usb device connected the guest will shutdown all usb
> > bus activity, so the emulation cpu cycles are still saved as long as usb
> > redirection is not actively used.
> > 
> > > > While being at it (just to be sure, I think there is another bz for that
> > > > already):  virtio-gpu support would be nice very useful too.  On aarch64
> > > > virtio-gpu is the only display adapter available.
> > > 
> > > Is there remoting available for it?
> > 
> > virtio-gpu can operate in two modes: 2d (not accelerated) and 3d (virgl
> > acceleration).  2d mode works remotely just fine, like any other qemu
> > display adapter.  remote support for 3d/virgl mode is still WIP upstream.
> 
> Michal - where do we stand on this?

Played with it, not consumable yet. I do not expect to have all components ready before 7.4

Comment 11 Red Hat Bugzilla Rules Engine 2017-06-20 15:36:19 UTC
This request has been proposed for two releases. This is invalid flag usage. The ovirt-future release flag has been cleared. If you wish to change the release flag, you must clear one release flag and then set the other release flag to ?.

Comment 12 Ryan Barry 2019-01-03 12:49:58 UTC
This will not be addressed in a reasonable timeframe. Please re-open if it's still important.