When vendor uses its own subvendor id, the resulting driver
package will not formally be compatible with devices of RedHat and other
vendors, because of hardware ID changing in the .inf file. Using
Compatible ID provides compatibility between drivers of different vendors.
If several versions of the driver packages were found during installation,
configuration manager will select a package with a exactly matching
Hardware ID, it is important especially when driver was obtained
automatically from Windows Update.
Signed-off-by: Ilya Rudakov <[email protected]>
It is important that all parties shipping virtio-win drivers use their
own vendor-specific HW ID to avoid driving somebody else's device.
This is especially critical for WHQL'ed drivers distributed with Windows
Update, as these could be installed without any explicit user action.
This commit introduces a new build-time variable SUBSYSTEM_VENDOR_ID
to be set by vendors in their respective Driver.$(_VENDOR_).props file.
The default value is 1AF4, exposed by VirtIO devices in upstream QEMU
and reserved by Red Hat.
Signed-off-by: Ladi Prosek <[email protected]>
The INF verification test in Win10 HLK 1703 started treating some
of the verification warnings as errors:
Section [sourcedisksfiles] is defined multiple times.
Empty DDInstall section will not install any drivers.
This commit fixes it by merging [sourcedisksfiles] sections into
one and adding a [CopyFiles_Child] section.
Signed-off-by: Ladi Prosek <[email protected]>
Driver.c - #includes vendor.check.h for logging
vioinput.inx - replace rhel vendor specific with INX_ that will be
substituted by tools
vioinput.rc - simplified and use common schema from tools
vioinput.props - enables features
vioinput.vcxproj - import props, import tools targets
same for hidpassthrough
Signed-off-by: Alexey V. Kostyushko <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
The canonical KMDF HID driver uses mshidkmdf.sys (or its equivalent
viohidkmdf.sys) as the FDO for the device and the actual KMDF driver
as its lower filter to work around PnP KMDF limitations. This works,
except for the case where the same device, in terms of USB or PCI or
any other bus location, may expose different HID collections every time
it's plugged in. Because the instance path of the HID PDO (like for
example "HID-compliant mouse") is constructed only from the instance
path of the parent - likely just by replacing the bus ID with "HID" -
the system will reuse pre-existing devnodes, even if the HID collection
and the report descriptor are completely different and a keyboard,
for example, should be created instead of a mouse.
It's not hard to run into this issue with the vioinput driver. E.g.
switching from
-device virtio-mouse-pci
to
-device virtio-keyboard-pci
for the same PCI slot will result in the system loading the mouse HID
driver and the keyboard not working.
This commit works around it by making the KMDF driver a bus driver
which enumerates one and only child PDO, functionally driven by
viohidkmdf.sys. IOCTL IRPs are forwarded from viohidkmdf to vioinput
and processed just like before. The key difference is that vioinput
now generates the instance ID of the child, thus having the ability
to alter the instance path depending on the shape of the input device.
Specifically, vioinput computes a simple hash out of the HID report
descriptor and uses it as the child instance ID.
The child device is hidden from Device Manager so as not to confuse
users. It's not meant to be manipulated except through its parent.
Signed-off-by: Ladi Prosek <[email protected]>
This commit makes the hidpassthrough project part of the build
and makes vioinput install and use it instead of mshidkmdf.sys.
The primary reason for building our own HID KMDF shim is the
requirement to certify vioinput on server core Windows where the
in-box component is missing. A nice side-effect is that the driver
may be built for older Windows as well, although that may not be
of much use.
This commit adds a new driver for the virtio input devices
with VEN 1AF4 and DEV 1052. The initial implementation exposes
all input devices as a basic 3-button mouse so it's useful
only for the mouse device (-device virtio-mouse-pci) for now.
TODO:
- build HID descriptors dynamically depending on the virtual
device capabilities
- implement status queue support (keyboard LEDs and such)
The driver is a miniport HID driver, acting like a lower
filter for MsHidKmdf.sys which ships with Windows 7 and newer.