]> xenbits.xensource.com Git - pvdrivers/win/xenvkbd.git/log
pvdrivers/win/xenvkbd.git
6 years agoWork around yet another bug in SDV
Paul Durrant [Thu, 19 Jul 2018 11:21:46 +0000 (12:21 +0100)]
Work around yet another bug in SDV

It appears that SDV objects to the symbol 'Constrain' being defined,
presumably because it uses it internally in some way. This patch
therefore re-codes the static inline Constrain function in ring.c as a
macro to avoid the clash.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
6 years agoWork around bug in VS2017 SDV
Paul Durrant [Thu, 19 Jul 2018 11:11:36 +0000 (12:11 +0100)]
Work around bug in VS2017 SDV

XENBUS commit 868cd40f (of the same name) introduced a workaround for a
quoting bug in SDV. This commit applies a similar workaround for XENVKBD.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
6 years agoAdd SDV into build
Paul Durrant [Thu, 19 Jul 2018 10:28:19 +0000 (11:28 +0100)]
Add SDV into build

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
6 years agoDisable spectre mitigation warnings
Paul Durrant [Fri, 13 Jul 2018 08:54:53 +0000 (09:54 +0100)]
Disable spectre mitigation warnings

These are not terribly useful and cause the build to fail.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoFix a couple of key mappings...
Paul Durrant [Thu, 1 Feb 2018 15:38:32 +0000 (15:38 +0000)]
Fix a couple of key mappings...

...which gets CTRL+ALT+DEL working

This patch also adds some helpful debug code.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoDynamically build key-code to usage map
Paul Durrant [Thu, 1 Feb 2018 14:33:14 +0000 (14:33 +0000)]
Dynamically build key-code to usage map

This patch creates a header defining the linux keycodes used by the
vkbd protocol and macros to map those (by name) to HID usage codes.
A new function then makes use of these of the new definitions and macros
to create a direct mapping from key-code to usage dynamically during
ring initialization.

The patch also adds missing locking inside the DPC and a shutdown race
which could occasionally free the ring structure from underneath the DPC.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoFix HID code for KEY_ENTER
Paul Durrant [Wed, 31 Jan 2018 17:06:11 +0000 (17:06 +0000)]
Fix HID code for KEY_ENTER

The VkbdKeyCodeToUsage array has the value for KEY_ESCAPE (0x29)
incorrectly placed in this entry. This patch replaces that with 0x28, which
is the correct code for the ENTER key.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoFix line endings
Paul Durrant [Wed, 31 Jan 2018 16:56:19 +0000 (16:56 +0000)]
Fix line endings

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoGive XENVKBD its own test signing cert
Paul Durrant [Tue, 30 Jan 2018 13:43:34 +0000 (13:43 +0000)]
Give XENVKBD its own test signing cert

The initial commit stole and re-used XENVIF's cert. This patch adds a new
one generated by:

makecert -a sha256 -r -pe -sv xenvkbd.pvk -n "CN=XENVKBD (TEST)" xenvkbd.cer
pvk2pfx -pvk xenvkbd.pvk -pi "" -spc xenvkbd.cer -pfx xenvkbd.pfx -f

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoDo more optimization in release builds and add /Qspectre flag
Paul Durrant [Tue, 30 Jan 2018 11:07:21 +0000 (11:07 +0000)]
Do more optimization in release builds and add /Qspectre flag

Spectre mitigations apparently only work on optimized code.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoAdd support for building with Visual Studio 2017
Paul Durrant [Tue, 30 Jan 2018 11:02:33 +0000 (11:02 +0000)]
Add support for building with Visual Studio 2017

Also remove mappings for obsolete versions of VS in build.py.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoMake sure Mdl->StartVa is set by __AllocatePages()
Paul Durrant [Thu, 25 Jan 2018 14:11:08 +0000 (14:11 +0000)]
Make sure Mdl->StartVa is set by __AllocatePages()

wdm.h carries this comment:

// Notice that while in the context of the subject thread, the base virtual
// address of a buffer mapped by an MDL may be referenced using the
// following:
//
//      Mdl->StartVa | Mdl->ByteOffset
//

Hence it is important that a mapped MDL has a valid StartVa field as well
as a valid MappedSystemVa field. Unfortunately, for reasons best known to
Microsoft, MmMapLockedPagesSpecifyCache() does not ensure this is the
case, so it needs to be fixed up by __AllocatePages() itself.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoRemove ZwFlushKey() from registry code
Paul Durrant [Thu, 3 Aug 2017 10:55:40 +0000 (11:55 +0100)]
Remove ZwFlushKey() from registry code

Attempting to flush registry keys early in boot causes an error to be
logged.

This patch therefore removes the explicit flushes from the registry code.
There is no option but to trust Windows lazy flush.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoUpdate kbdif.h and use feature-raw-pointer
Owen Smith [Thu, 20 Jul 2017 11:22:54 +0000 (12:22 +0100)]
Update kbdif.h and use feature-raw-pointer

Updates the xen public header to include the definition of
[feature|request]-raw-pointer.
Renames VkbdStandalone to RawPointer and uses the newly defined feature
and request names.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
7 years agoRemove the SDV run from build.py
Paul Durrant [Mon, 12 Jun 2017 10:15:21 +0000 (11:15 +0100)]
Remove the SDV run from build.py

SDV appears to be broken for this driver as follows:

  SDV is building for <Windows 10 Release|x64>
  Build     'xenvkbd' ... Done
  The call to Slamcl returned with exit code:=1.
  This happened while compiling compile6.cmd.
  The compile step failed for   'xenvkbd' .
  SDV exit code: 5
  SDV encountered errors when scanning the driver. Please ensure roletypes are present and/or consult SDV documentation.
C:\Program Files (x86)\Windows Kits\10\build\windowsdriver.Sdv.targets(120,9): error MSB3075: The command "staticdv.exe /check:default.sdv" exited with code 5. Please verify that you have sufficient rights to run this command. [C:\Jenkins\Workspace\XENVKBD-master\vs2015\xenvkbd\xenvkbd.vcxproj]
Done Building Project "C:\Jenkins\Workspace\XENVKBD-master\vs2015\xenvkbd\xenvkbd.vcxproj" (sdv target(s)) -- FAILED.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoRemove old 8.x revisions
Owen Smith [Wed, 7 Jun 2017 15:48:53 +0000 (16:48 +0100)]
Remove old 8.x revisions

Signed-off-by: Owen Smith <owen.smith@citrix.com>
7 years agoRead "feature-vkbd-standalone"
Owen Smith [Wed, 7 Jun 2017 12:55:49 +0000 (13:55 +0100)]
Read "feature-vkbd-standalone"

Read "feature-vkbd-standalone" and fail connect
if it is not 1. Writes "request-vkbd-standalone" before
transitioning to Connected.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
7 years agoMove input reports to Ring.c
Owen Smith [Wed, 7 Jun 2017 12:48:27 +0000 (13:48 +0100)]
Move input reports to Ring.c

Has the benefit of not requiring another suspend callback or debug
callback

Signed-off-by: Owen Smith <owen.smith@citrix.com>
7 years agoMake msbuild.bat executable
Owen Smith [Wed, 7 Jun 2017 12:06:02 +0000 (13:06 +0100)]
Make msbuild.bat executable

Signed-off-by: Owen Smith <owen.smith@citrix.com>
7 years agoRemove VS2013 build scripts
Paul Durrant [Fri, 2 Jun 2017 14:57:43 +0000 (15:57 +0100)]
Remove VS2013 build scripts

This is a version 9.0 driver so there is no need to build on anything older
than VS2015.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
7 years agoInitial commit
Owen Smith [Fri, 2 Jun 2017 13:36:26 +0000 (14:36 +0100)]
Initial commit

Signed-off-by: Owen Smith <owen.smith@citrix.com>