RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1357406 - Add virtio-input Windows guest driver
Summary: Add virtio-input Windows guest driver
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virtio-win
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Danilo de Paula
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-18 07:03 UTC by Ladi Prosek
Modified: 2017-08-01 12:53 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
This update adds the virtio-input driver, which enables using the following input devices on Windows 7 and later virtual machines: - virtio-keyboard-pci - virtio-mouse-pci - virtio-tablet-pci - virtio-input-host-pci
Clone Of:
Environment:
Last Closed: 2017-08-01 12:53:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
virtio-win rhel7.4 vioinput test plan (93.37 KB, application/pdf)
2016-10-27 03:07 UTC, Peixiu Hou
no flags Details
Updated virtio-win vioinput test plan (92.57 KB, application/pdf)
2016-10-31 09:05 UTC, Peixiu Hou
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2341 0 normal SHIPPED_LIVE virtio-win bug fix and enhancement update 2017-08-01 16:52:38 UTC

Description Ladi Prosek 2016-07-18 07:03:05 UTC
Description of problem:

QEMU supports new input devices virtio-keyboard-pci, virtio-mouse-pci, virtio-tablet-pci, virtio-input-host-pci. This BZ tracks adding driver support for these in Windows guests.

Comment 5 vans163 2016-08-24 18:42:47 UTC
Support for this would be critical. It would remove the need to rely on guest agents/clients to accurately and efficiently SendInput to the guest vm.

Comment 11 Peixiu Hou 2016-10-10 02:38:58 UTC
Hi Ladi,

I'm preparing virtio-win vioinput test plan on RHEL7.4, I have 2 questions for the virtio-input test:

1. After add virtio-input device, like virtio keyboard, which keyboard will be used default by windows guest? Because there are two keyboards in guest's device management, HIID Keyboard Device and Standard PS/2 Keyboard. Mouse is similar.
Add how to judge the virtio input device is working? any characteristic can be used to confirm virtio-input devices are working instead of PS/2 devices? 

2. What is the difference between "-device virtio-mouse-pci" and "-device virtio-tablet-pci"? In the windows guest, they are show same device name -HIID compliant mouse.


Thanks a lot~
Peixiu Hou

Comment 12 Ladi Prosek 2016-10-10 09:01:20 UTC
Hi Peixiu Hou,

(In reply to Peixiu Hou from comment #11)
> Hi Ladi,
> 
> I'm preparing virtio-win vioinput test plan on RHEL7.4, I have 2 questions
> for the virtio-input test:
> 
> 1. After add virtio-input device, like virtio keyboard, which keyboard will
> be used default by windows guest? Because there are two keyboards in guest's
> device management, HIID Keyboard Device and Standard PS/2 Keyboard. Mouse is
> similar.

QEMU will route input events to virtio-input devices if they have been initialized by the guest. If a driver is not present or is broken, QEMU will route input events to PS/2 devices.

> Add how to judge the virtio input device is working? any characteristic can
> be used to confirm virtio-input devices are working instead of PS/2 devices? 

Here's what I use, for example with virtio-tablet-pci. If you disable the "HID-compliant mouse" device in Device Manager, mouse input will stop working. The guest driver is still loaded so QEMU sends input events to it, but Windows won't do anything with them so there will be no working mouse.

If, on the other hand, you disable the FDO "VirtIO Input Driver", QEMU will fall back to PS/2 mouse and the mouse will still work.

There are also little tell-tale signs by which you can guess what's being used. For example virtio-tablet-pci is an absolute pointing device so, unlike PS/2 mouse, there's no need to "exit mouse grab" (this is when running with a local SDL window).

> 2. What is the difference between "-device virtio-mouse-pci" and "-device
> virtio-tablet-pci"? In the windows guest, they are show same device name
> -HIID compliant mouse.

virtio-mouse-pci is a relative pointing device, virtio-tablet-pci is absolute. As mentioned above, it has implications for "mouse grab" but other than that, they're both just mice. We could expose virtio-tablet-pci as a tablet to Windows (there's a compile-time switch to do that) but it's not all that useful in my opinion.

Are you also going to look at input device assignment (pass-through)? This is done with "-device virtio-input-host-pci" and that's where virtio-input really shines. For mice, you may be able to use extra buttons (typically back/forward, horizontal scroll wheel, etc.) and for keyboards extra function keys like Calculator, Email, Mute, Volume up/down and so on.

Thanks!
Ladi

Comment 13 Peixiu Hou 2016-10-12 06:27:05 UTC
(In reply to Ladi Prosek from comment #12)
> Hi Peixiu Hou,
> 
> (In reply to Peixiu Hou from comment #11)
> > Hi Ladi,
> > 
> > I'm preparing virtio-win vioinput test plan on RHEL7.4, I have 2 questions
> > for the virtio-input test:
> > 
> > 1. After add virtio-input device, like virtio keyboard, which keyboard will
> > be used default by windows guest? Because there are two keyboards in guest's
> > device management, HIID Keyboard Device and Standard PS/2 Keyboard. Mouse is
> > similar.
> 
> QEMU will route input events to virtio-input devices if they have been
> initialized by the guest. If a driver is not present or is broken, QEMU will
> route input events to PS/2 devices.
> 
> > Add how to judge the virtio input device is working? any characteristic can
> > be used to confirm virtio-input devices are working instead of PS/2 devices? 
> 
> Here's what I use, for example with virtio-tablet-pci. If you disable the
> "HID-compliant mouse" device in Device Manager, mouse input will stop
> working. The guest driver is still loaded so QEMU sends input events to it,
> but Windows won't do anything with them so there will be no working mouse.
> 
> If, on the other hand, you disable the FDO "VirtIO Input Driver", QEMU will
> fall back to PS/2 mouse and the mouse will still work.
> 
> There are also little tell-tale signs by which you can guess what's being
> used. For example virtio-tablet-pci is an absolute pointing device so,
> unlike PS/2 mouse, there's no need to "exit mouse grab" (this is when
> running with a local SDL window).
> 
> > 2. What is the difference between "-device virtio-mouse-pci" and "-device
> > virtio-tablet-pci"? In the windows guest, they are show same device name
> > -HIID compliant mouse.
> 
> virtio-mouse-pci is a relative pointing device, virtio-tablet-pci is
> absolute. As mentioned above, it has implications for "mouse grab" but other
> than that, they're both just mice. We could expose virtio-tablet-pci as a
> tablet to Windows (there's a compile-time switch to do that) but it's not
> all that useful in my opinion.
> 
> Are you also going to look at input device assignment (pass-through)? This
> is done with "-device virtio-input-host-pci" and that's where virtio-input
> really shines. For mice, you may be able to use extra buttons (typically
> back/forward, horizontal scroll wheel, etc.) and for keyboards extra
> function keys like Calculator, Email, Mute, Volume up/down and so on.
> 
> Thanks!
> Ladi

OK, thanks so much, also thanks a lot for your support about virtio-input-host-pci.
And I want to confirm an another question:
I tried with virtio-mouse-pci, virtio-tablet-pci, both can be disabled, but for virtio-keyboard-pci, the disable button is gray, I cannot disable this device, both "Virtio Input Driver" and "HID Keyboard Device". Whether it's a behavior design or not? 


Thanks~
Peixiu Hou

Comment 14 Ladi Prosek 2016-10-12 07:49:16 UTC
(In reply to Peixiu Hou from comment #13)
> <snip>
> And I want to confirm an another question:
> I tried with virtio-mouse-pci, virtio-tablet-pci, both can be disabled, but
> for virtio-keyboard-pci, the disable button is gray, I cannot disable this
> device, both "Virtio Input Driver" and "HID Keyboard Device". Whether it's a
> behavior design or not? 

That seems to be by design, random online discussions suggest that keyboard cannot be disabled. Uninstalling the HID Keyboard Device will have the same effect, alhough likely only temporary because Windows will reinstall the device on next boot.

Thanks!
Ladi

Comment 15 Peixiu Hou 2016-10-27 03:07:09 UTC
Created attachment 1214475 [details]
virtio-win rhel7.4 vioinput test plan

Hi Ladi,

The virtio-win RHEL7.4 vioinput test plan has completed as the attachment, please help to check and sign-off, thanks a lot~

And, I also have 2 questions need to confirm:

1. When we run vioinput whql test, if we add keyboard, mouse, and tablet in the guest, the hck device management will include 3 virtio input drivers. So which one will we choose to run? if any one is ok? (no matter choose any one, the whql jobs are same).

2. Does RHEL6.9 support the vioinput?

Thanks so much~
Peixiu Hou

Comment 16 Ladi Prosek 2016-10-27 08:53:31 UTC
Hi Peixiu Hou,

(In reply to Peixiu Hou from comment #15)
> Created attachment 1214475 [details]
> virtio-win rhel7.4 vioinput test plan
> 
> Hi Ladi,
> 
> The virtio-win RHEL7.4 vioinput test plan has completed as the attachment,
> please help to check and sign-off, thanks a lot~

2 Driver Mapping table

The driver is going to be available only for Win7, Win8, and Win10. So the table should look like this:

Directory Support OS
Install\Win7\x86 Win7 - 32 bit
Install\Win7\amd64 Win7, Win2008R2 - all 64 bit
Install\Win8\x86 Win8, Win8.1 - all 32 bit
Install\Win8\amd64 Win8, Win8.1, Win2012, Win2012R2 - all 64 bit
Install\Win10\x86 Win10 - 32 bit
Install\Win10\amd64 Win10, Win2016 - all 64 bit

5 Function Test Scenarios

Are any or all of the tests going to be run with driver verifier enabled? Please make sure to enable it for the following drivers:

vioinput.sys
hidclass.sys
hidparse.sys
mshidkmdf.sys

For passthrough functional tests, when assigning a keyboard device to the VM, please also do the following:
- in the guest start On-Screen Keyboard
- verify that pressing the CapsLock, ScrollLock, and NumLock buttons on the on-screen keyboard toggles the corresponding LED indicators on the physical keyboard device

Other than that it looks good, thank you!

> And, I also have 2 questions need to confirm:
> 
> 1. When we run vioinput whql test, if we add keyboard, mouse, and tablet in
> the guest, the hck device management will include 3 virtio input drivers. So
> which one will we choose to run? if any one is ok? (no matter choose any
> one, the whql jobs are same).

Can you please paste the list of tests here? If they look like they actually verify features specific to individual device types, then it would be desirable to run the tests on all three drivers. If they look more generic, any of them would do.
 
> 2. Does RHEL6.9 support the vioinput?

No, it does not.

> Thanks so much~
> Peixiu Hou

Thanks!
Ladi

Comment 17 Peixiu Hou 2016-10-31 09:05:09 UTC
Created attachment 1215734 [details]
Updated virtio-win vioinput test plan

Hi Ladi,

Thanks for your feedback~~

1) For the vioinput test plan, I've done following updates:
1. Mapping table has updated as following: 
Directory	        Support OS
Install\\Win7\\x86	Win7- all 32 bit   
Install\\Win7\\amd64 	Win7, Win2008 R2 - all 64 bit
Install\Win8\\x86	Win8, Win8.1 - all 32 bit 
Install\Win8\\amd64	Win8, Win8.1,Win2012,Win2012R2 - all 64 bit   
Install\Win10\\x86	Win10 - all 32 bit
Install\Win10\\amd64	Win10,Win2016 - all 64 bit 

2. All of the tests will be run with driver verifier enabled. And all vioinput.sys, hidclass.sys, hidparse.sys, mshidkmdf.sys will be enabled.

3. For passthrough functional tests, added steps as:
------------------------------------------------------------------------------
step3. In the guest start On-Screen Keyboard.
       Start+R -->run osk.exe 
step4. Pressing the Capslock, ScrollLock, and NumLock buttons on
the on-screen keyboard, check the corresponding LED indicators on the physical keyboard device.
Note: Find NumLock button after turn on the numeric key pad in 'options' control on the on-screen keyboard.
Expected results:  After press the Capslock, ScrollLock, and NumLock buttons on the on-screen keyboard,  the corresponding LED indicators on the physical keyboard device should be lighted.
------------------------------------------------------------------------------
And the latest virtio-win RHEL7.4 vioinput test plan as attacment, please help to check, thanks a lot~

2) For the vioinput whql test, compared between the three virtio input drivers for different vioinput device(Keyboard, mouse, tablet),the job of them are same, they look generic. Each virtio input driver includes 35 jobs, the job list as follows:
------------------------------------------------------------------------------
DF - Concurrent Hardware And Operating System (CHAOS) Test 
DF - PNP Rebalance Fail Restart Device Test (Certification)
DF - PNP Rebalance Request New Resources Device Test (Certification)
DF - PNP Stop (Rebalance) Device Test (Certification)
DevFund Broker Test
DevFund INF Test
Device Driver INF Verification Test (Certification)
DF - Embedded Signature Verification Test (Certification)
DF - Fuzz Misc API test (Certification)
DF - Fuzz misc API with zero length query test (Certification)
DF - Fuzz open and close test (Certification)
DF - Fuzz Query and Set File Information Test (Certification)
DF - Fuzz Query and Set Security Test (Certification)
DF - Fuzz random FSCTL test (Certification)
DF - Fuzz random IOCTL test (Certification)
DF - Fuzz sub-opens test (Certification)
DF - Fuzz sub-opens with streams test (Certification)
DF - Fuzz zero length buffer FSCTL test (Certification)
DF - Fuzz zero length buffer IOCTL test (Certification)
DF - PNP Cancel Remove Device Test (Certification)
DF - PNP Cancel Stop Device Test (Certification)
DF - PNP DIF Remove Device Test (Certification)
DF - PNP Disable And Enable Device Test (Certification)
DF - PNP Remove Device Test (Certification)
DF - PNP Surprise Remove Device Test (Certification)
DF - Reinstall with IO Before and After (Certification)
DF - Sleep and PNP (disable and enable) with IO Before and After (Certification)
DF - Sleep with IO During (Certification)
Driver Memory Test
PCI Hardware Compliance Test For a Single Device (PCIHCT)
TDI filters and LSPs are not allowed
Wdf - Check Kmdf Coinstaller Version Test
Wdf - Check Kmdf Function Table Test
Wdf - Kmdf Fault Injection Test
Wdf - Verify Driver Load Order Group is not WdfLoadGroup
--------------------------------------------------------------------------------


Best Regards~
Peixiu Hou

Comment 18 Ladi Prosek 2016-10-31 09:42:53 UTC
(In reply to Peixiu Hou from comment #17)
> Created attachment 1215734 [details]
> Updated virtio-win vioinput test plan

Great, thank you!

> 2) For the vioinput whql test, compared between the three virtio input
> drivers for different vioinput device(Keyboard, mouse, tablet),the job of
> them are same, they look generic.

In that case please use any one of the three drivers for the verification.

Thanks!
Ladi

Comment 19 Yu Wang 2016-12-26 09:23:28 UTC
Hi Ladi,

QE met a problem when running virtio-input whql test on win2012R2/2016(core w/o GUI), we got error when running "Device Status Check" as below:
 
Error 12/26/2016 3:06:49.775 AM WDTF_TEST : Found a device that has a non-zero problem code or is phantom. Logging device info. 

"WDTF_TEST : Status: Status Flags=0x1806400 (DN_HAS_PROBLEM DN_DISABLEABLE DN_REMOVABLE DN_NT_ENUMERATOR DN_NT_DRIVER) Problem Code=27 (CM_PROB_DRIVER_FAILED_LOAD)"

But this job can pass when it boot with a GUI guest on win2012R2/2016.

Could you help to check if virtio-input device could be supported w/o GUI?


Thanks
Yu Wang

Comment 20 Ladi Prosek 2017-01-02 16:43:21 UTC
Hi Yu Wang,

(In reply to Yu Wang from comment #19)
> Hi Ladi,
> 
> QE met a problem when running virtio-input whql test on win2012R2/2016(core
> w/o GUI), we got error when running "Device Status Check" as below:
>  
> Error 12/26/2016 3:06:49.775 AM WDTF_TEST : Found a device that has a
> non-zero problem code or is phantom. Logging device info. 
> 
> "WDTF_TEST : Status: Status Flags=0x1806400 (DN_HAS_PROBLEM DN_DISABLEABLE
> DN_REMOVABLE DN_NT_ENUMERATOR DN_NT_DRIVER) Problem Code=27
> (CM_PROB_DRIVER_FAILED_LOAD)"
> 
> But this job can pass when it boot with a GUI guest on win2012R2/2016.
> 
> Could you help to check if virtio-input device could be supported w/o GUI?

This is caused by mshidkmdf.sys missing from Windows Server installed without the Desktop Experience option. Apparently, we are not the first ones to hit this:

https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/7152107d-46ef-4aa1-9539-23d375b90a45/how-to-pass-whql-hlk-tests-for-kmdf-hid-minidriver-on-server-core-2016

We could work around it by shipping our own build of mshidkmdf.sys, but since input is not of much importance without GUI, I'd say that we should just get errata from Microsoft for this. Let's discuss further in bug 1408901.

Thanks!
Ladi

Comment 28 Yu Wang 2017-06-14 06:32:23 UTC
Hi,

After installing the virtio-win rpm package, virtioinput related driver are in iso and pass the acceptance tests.
version: virtio-win-1.9.1-0.el7.noarch.rpm

change status to verified.

Thanks
Yu Wang

Comment 30 errata-xmlrpc 2017-08-01 12:53:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2341


Note You need to log in before you can comment on or make changes to this bug.