]> xenbits.xensource.com Git - pvdrivers/win/xenvkbd.git/log
pvdrivers/win/xenvkbd.git
9 months agoUpdate MAINTAINERS master
Paul Durrant [Tue, 2 Jul 2024 08:57:19 +0000 (09:57 +0100)]
Update MAINTAINERS

Remove Ben as he is no longer involved in the project, and update Owen's
email address.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
16 months agoRemove VS2015 and VS2017 projects and configurations
Owen Smith [Mon, 20 Nov 2023 15:03:13 +0000 (15:03 +0000)]
Remove VS2015 and VS2017 projects and configurations

Signed-off-by: Owen Smith <owen.smith@cloud.com>
19 months agoDelete CoInstaller code
Owen Smith [Mon, 2 Oct 2023 12:52:07 +0000 (13:52 +0100)]
Delete CoInstaller code

With the CoInstaller removed from the INF file, delete the CoInstaller
source code and projects.

Signed-off-by: Owen Smith <owen.smith@cloud.com>
19 months agoRemove CoInstaller from INF
Owen Smith [Mon, 2 Oct 2023 12:52:06 +0000 (13:52 +0100)]
Remove CoInstaller from INF

Windows 11 22H2 WHQL requires INF files pass "InfVerif /k", which highlights
several issues
- PnpLockdown=1 needs to be specified
- CoInstallers are no longer allowed

The CoInstaller has several functions that will need alternative solutions:
- The AllowUpdate mechanism is no longer possible
- The safety checks that ensure interface versionings remain compatible

Interface safety checks need to be handled by changes to child device bindings.

Also updates the INF bindings to require XenBus with CoInstaller removed to
maintain consistent CoInstaller removal versioning.

Signed-off-by: Owen Smith <owen.smith@cloud.com>
19 months agoRemove unplug_interface.h
Owen Smith [Mon, 2 Oct 2023 12:52:05 +0000 (13:52 +0100)]
Remove unplug_interface.h

XenVkbd doesnt use the UNPLUG interface, so remove query interface calls
and all references to Unplugs

Signed-off-by: Owen Smith <owen.smith@cloud.com>
19 months agoRemove REV from DeviceID
Owen Smith [Mon, 2 Oct 2023 12:52:04 +0000 (13:52 +0100)]
Remove REV from DeviceID

Driver upgrades use HardwareIDs (or CompatibleIDs) to match the child INF DDInstall
section (stored as matching device id), but use the DeviceID to generate the device
instance path. By keeping the device instance path the same over upgrades, the network
stack should identify this as an upgrade, rather than 'replacement hardware', and
not generate a new network connection, which would require network settings to be
copied from the existing network connection to the new network connection.

Note: Adds a strict requirement on child INF DDInstall sections, to specify the full
hardware ID (including revision) to guarantee interface versions are correctly supported

Signed-off-by: Owen Smith <owen.smith@cloud.com>
19 months agoFix Length calculation in PdoQueryId
Owen Smith [Mon, 2 Oct 2023 12:52:03 +0000 (13:52 +0100)]
Fix Length calculation in PdoQueryId

Decrease Length by the string length of the current ID before moving
the Buffer value to the end of the current ID. Without this, Length
is not decreased, leading to potential issues with the next call to
RtlStringCbPrintfW.
Note: the second chunk it to maintain consistent ordering of operations
for clarity, and has no functional change.

Signed-off-by: Owen Smith <owen.smith@cloud.com>
19 months agoAdd script to generate pooltag.txt for debugger use
Owen Smith [Wed, 13 Sep 2023 08:48:35 +0000 (09:48 +0100)]
Add script to generate pooltag.txt for debugger use

Note: script does not correctly handle src/common paths and attributes
  pool tags discovered within to 'common.sys'

Signed-off-by: Owen Smith <owen.smith@cloud.com>
23 months agoRebuild CodeQL builds
Owen Smith [Tue, 18 Apr 2023 08:50:45 +0000 (09:50 +0100)]
Rebuild CodeQL builds

CodeQL can sometimes fail to detect any source code if the codebase is
not rebuilt. Use the Rebuild target to force all intermediate build artifacts
to be cleaned beforehand.

Signed-off-by: Owen Smith <owen.smith@cloud.com>
23 months agoCheck for zero byte allocations
Owen Smith [Mon, 17 Apr 2023 13:24:39 +0000 (14:24 +0100)]
Check for zero byte allocations

Avoid attempting to allocate zero byte buffers, which can lead to
inefficiencies in pool memory usage.

Suggested-by: Matthew Sykes <matthew.sykes@citrix.com>
Signed-off-by: Owen Smith <owen.smith@cloud.com>
2 years agoScripted replacement of Copyright notices in source
Owen Smith [Tue, 28 Mar 2023 11:52:22 +0000 (12:52 +0100)]
Scripted replacement of Copyright notices in source

Due to a transfer of copyright ownership from Citrix to Cloud Software Group,
the copyright notices in all source files should be updated.

Using the powershell script below replace "Copyright (c) Citrix Systems, Inc."
with "Copyright (c) Xen Project." and "Copyright (c) Cloud Software Group, Inc."

Function Multiline-Replace {
    param(
        [string]$Filename,
        [string]$ToReplace,
        [array]$ReplaceWith
    )

    $content = Get-Content $Filename
    $replace = $false
    $output = ""
    $content | ForEach {
        $line = $_
        if ($line.Contains($ToReplace)) {
            $replace = $true
            $ReplaceWith | ForEach {
                $output += $line.Replace($ToReplace, $_) + "`n"
            }
        } else {
            $output += $line + "`n"
        }
    }
    if ($replace) {
        Write-Host "Replacing: " $Filename
        $output | Set-Content $Filename
    } else {
        Write-Host "Ignoring:  " $Filename
    }
}

Function Replace-Filestrings {
    param(
        [array]$FilleTypes,
        [string]$ToReplace,
        [array]$Replacements,
        [array]$ExcludeList
    )

    $FileTypes | ForEach {
        Get-ChildItem $_ -Recurse | ForEach-Object {
            $filename = $_
            if (($ExcludeList | %{ $filename -Like $_ }) -Contains $True) {
                Write-Host "Excluding: " $filename
            } else {
                Multiline-Replace $_ $ToReplace $Replacements
            }
        }
    }
}

$ExcludeList = @("*include\xen\*", "*\obj\*")
$Replace = "Copyright (c) Citrix Systems Inc."

$Replacements = @("/* Copyright (c) Xen Project.", " * Copyright (c) Cloud Software Group, Inc.")
$FileTypes = @("*.c", "*.h", "*.rc")
Replace-Filestrings $FileTypes ('/* ' + $Replace) $Replacements $ExcludeList

$Replacements = @("; // Copyright (c) Xen Project.", "; // Copyright (c) Cloud Software Group, Inc.")
$FileTypes = @("*.mc")
Replace-Filestrings $FileTypes ('; // ' + $Replace) $Replacements $ExcludeList

$Replacements = @("; Copyright (c) Xen Project.", "; Copyright (c) Cloud Software Group, Inc.")
$FileTypes = @("*.inf", "*.def")
Replace-Filestrings $FileTypes ('; ' + $Replace) $Replacements $ExcludeList

$Replacements = @("Copyright (c) Xen Project.", "Copyright (c) Cloud Software Group, Inc.")
$FileTypes = @("LICENSE")
Replace-Filestrings $FileTypes $Replace $Replacements $ExcludeList

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Manually fixed whitespace at end of files.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
2 years agoAdd resource file to coinstaller
Owen Smith [Tue, 28 Mar 2023 11:52:21 +0000 (12:52 +0100)]
Add resource file to coinstaller

Signed-off-by: Owen Smith <owen.smith@citrix.com>
2 years agoAllow rebranding file copyright string
Owen Smith [Tue, 28 Mar 2023 11:52:20 +0000 (12:52 +0100)]
Allow rebranding file copyright string

Pass COPYRIGHT string from environment to override the copyright string
that is embedded in the output binaries.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
2 years agoCorrect return codes during racy destruction.
Martin Harvey [Mon, 5 Dec 2022 09:01:59 +0000 (09:01 +0000)]
Correct return codes during racy destruction.

Errors in PnP retun codes found when testing under driver
verifier with mixed VM lifecycle operations. Under some
rare cases, it is possible to get more than one PnP
"remove-like" operation. This results in a PnP remove
operation being processed whilst the device is already
in the deleted state.

This patch fixes the immediate cause of the bugfixes,
by fixing the return code. Device destruction is
unchanged. Investigation into the root cause is still
ongoing.

Signed-off-by: Martin Harvey <martin.harvey@citrix.com>
Extrapolated this patch from other drivers.
Cosmetic fixes.

Signed-off-by: Paul Durrant <paul@xen.org>
2 years agoPass SignMode to MSBuild
Owen Smith [Fri, 18 Nov 2022 10:06:10 +0000 (10:06 +0000)]
Pass SignMode to MSBuild

Allows overriding of SignMode to "Off" to prevent signing binaries with the PFX
file. This is useful if wrapper builds sign binaries with alternative signatures
or when signing is not required.

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

Signed-off-by: Paul Durrant <paul@xen.org>
2 years agoAdd build options for EWDK 22621
Paul Durrant [Mon, 31 Oct 2022 14:53:52 +0000 (14:53 +0000)]
Add build options for EWDK 22621

VisualStudioVersion = 17.0 maps to Visual Studio 2022
 * Adds project files for vs2022
 * Adds mapping from VisualStudioVersion 17.0 to "vs2022" project folder
 * Adds mapping from VisualStudioVersion 17.0 to "Windows 10" build target
 * Adds guard to build.ps1 - EWDK 22621 does not build x86 binaries
 * Adds include directive where compiler intrinsics are used
   (and removes re-definition of 'offsetof')

Suggested-by: Owen Smith <owen.smith@citrix.com>
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
2 years agoAdd Svr2019, Svr2022 and Win11 to Inf2Cat
Owen Smith [Thu, 30 Jun 2022 14:24:03 +0000 (15:24 +0100)]
Add Svr2019, Svr2022 and Win11 to Inf2Cat

Signed-off-by: Owen Smith <owen.smith@citrix.com>
3 years agoAdd /CETCOMPAT to linker options
Paul Durrant [Mon, 6 Dec 2021 15:23:33 +0000 (15:23 +0000)]
Add /CETCOMPAT to linker options

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Ported from other drivers

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
3 years agoFix CodeQL warnings
Paul Durrant [Mon, 20 Sep 2021 12:16:39 +0000 (13:16 +0100)]
Fix CodeQL warnings

- ExAllocatePoolWithTag is deprecated in Win10 2004, use
    ExAllocatePoolUninitialized instead

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Ported from other drivers.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
3 years agoFix SDV/CodeQL log generation
Paul Durrant [Mon, 20 Sep 2021 12:08:53 +0000 (13:08 +0100)]
Fix SDV/CodeQL log generation

- sarif files need to be stored with SDV logs when generating the DVL file
- Disable PREFast and CodeAnalysis by default
- Run a seperate CodeAnalysis build after SDV, but before generating DVL file
    DVL file should contain multiple summary lines for SDV, at least 1 line
    for CodeAnalysis and at least 1 line for Semmle (CodeQL)

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Ported from other drivers.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
3 years agoDocument CodeQL build requirements
Owen Smith [Tue, 7 Sep 2021 08:10:46 +0000 (09:10 +0100)]
Document CodeQL build requirements

CodeQL requires an additional tool and rule set which are seperate from the
EWDK ISOs, and require manual installation and configuration

Signed-off-by: Owen Smith <owen.smith@citrix.com>
3 years agoFix build with later WDKs
Paul Durrant [Mon, 6 Sep 2021 13:35:29 +0000 (14:35 +0100)]
Fix build with later WDKs

- Adds alias for GetProjectInfoForReference target to version.vcxproj
  Later kits seemed to have renamed the build target, and will fail without
  this alias target.

- Adds "/fd sha256" to signtool command line
  WDK 20344 and later require binaries signed with a SHA256 file digest, or
  the build outputs are deleted

- Squash warnings 4061 and 26052 to avoid bogus noise.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
4 years agoAdd CodeQL build stage
Owen Smith [Fri, 5 Mar 2021 10:36:03 +0000 (10:36 +0000)]
Add CodeQL build stage

CodeQL logs will be required for future WHQL submissions. Add a stage
that generates the required SARIF files. CodeQL is a semantic code
analysis engine, which will highlight vunerabilities that will need
fixing.

In order to use CodeQL, the CodeQL binaries must be on the path and the
Windows-Driver-Developer-Supplemental-Tools must be on the path defined
by the CODEQL_QUERY_SUITE environment variable (if defined), or under
the parent folder (if CODEQL_QUERY_SUITE variable is not defined)

Note: Due to the way the codeql command line is built, using quotes in a
MSBuild command line is not possible, so generate a batch file to wrap
the command line.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
4 years agoBring XENBUS interface versions up to date...
Paul Durrant [Mon, 22 Feb 2021 10:10:40 +0000 (10:10 +0000)]
Bring XENBUS interface versions up to date...

... and update binding accordingly. Also remove PDO revisions 0x09000000 and
0x09000001 as they rely on versions of the XENBUS_STORE interface that are
no longer supported.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
4 years agoInherit versioning info from environment if present
Nicholas Tsirakis [Fri, 6 Nov 2020 20:48:44 +0000 (15:48 -0500)]
Inherit versioning info from environment if present

As the drivers stabilize and mature, there is an ever-growing
chance that other opensource virtualization projects will adopt
them. Allow external projects to inject their own versioning
into the drivers instead of hardcoding the latest winpv version.

Signed-off-by: Nicholas Tsirakis <tsirakisn@ainfosec.com>
Acked-by: Owen Smith <owen.smith@citrix.com>
4 years agoAllow user to specify desired build architecture
Nicholas Tsirakis [Fri, 6 Nov 2020 20:48:43 +0000 (15:48 -0500)]
Allow user to specify desired build architecture

Often times we only need to build a driver for a single
targeted architecture. Continue to build both by default,
but allow the user to specify one if desired.

Signed-off-by: Nicholas Tsirakis <tsirakisn@ainfosec.com>
Use [string]::IsNullOrEmpty($Arch)

Signed-off-by: Paul Durrant <paul@xen.org>
4 years agoFix HID code for KEY_SYSRQ.
Troy Crosley [Tue, 13 Oct 2020 22:25:15 +0000 (18:25 -0400)]
Fix HID code for KEY_SYSRQ.

Signed-off-by: Troy Crosley <troycrosley@gmail.com>
Acked-by: Owen Smith <owen.smith@citrix.com>
4 years agoDon't pass MM_DONT_ZERO_ALLOCATION to MmAllocatePagesForMdlEx()...
Paul Durrant [Wed, 17 Jun 2020 09:56:59 +0000 (10:56 +0100)]
Don't pass MM_DONT_ZERO_ALLOCATION to MmAllocatePagesForMdlEx()...

...in __AllocatePages()

See commit 4f85d004 "Replace uses of MmAllocatePagesForMdlEx in
__AllocatePage" in XENVIF for more background.

In summary, it is to avoid BSOD 139 1e with a stack similar to the following:

nt!KeBugCheckEx
nt!KiBugCheckDispatch+0x69
nt!KiFastFailDispatch+0xd0
nt!KiRaiseSecurityCheckFailure+0x30e
nt!KiAcquireThreadStateLock+0x11fa90
nt!KeSetIdealProcessorThreadEx+0xd0
nt!MiZeroInParallelWorker+0x115016
nt!MiZeroInParallel+0x11c
nt!MiInitializeMdlBatchPages+0x2ae
nt!MiAllocatePagesForMdl+0x192
nt!MmAllocatePartitionNodePagesForMdlEx+0xc9
nt!MmAllocatePagesForMdlEx+0x4d

These bugchecks have been observed in recent updates of Server 2019.

This patch, rather than replacing calls to MmAllocatePagesForMdlEx() with
calls to MmMapLockedPagesSpecifyCache(), just avoids passing
MM_DONT_ZERO_ALLOCATION to work round the bug.

The patch instead passes MM_ALLOCATE_FULLY_REQUIRED, which arguably should
have always been passed for allocations larger than a single page. It also
fixes a formatting issue.

Reported-by: Jan Bakuwel <jan.bakuwel@gmail.com>
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
5 years agoHandle return codes from MSBuild
Owen Smith [Tue, 10 Mar 2020 10:47:03 +0000 (10:47 +0000)]
Handle return codes from MSBuild

If MSBuild fails, it returns a non-zero return value. Forward this
failure to the calling scripts to fail earlier.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
5 years agoMAINTAINERS: Update my email address
Paul Durrant [Tue, 10 Mar 2020 10:56:55 +0000 (10:56 +0000)]
MAINTAINERS: Update my email address

My @amazon.com address is no longer convenient to use.

Signed-off-by: Paul Durrant <paul@xen.org>
5 years agobump version to 9.1.0
Paul Durrant [Fri, 6 Dec 2019 12:11:49 +0000 (12:11 +0000)]
bump version to 9.1.0

Now that 9.0 is branched (in staging-9.0) the master version needs to be
advanced.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
5 years agoCorrect the package name staging-9.0 9.0.0 9.0.0-rc2
Paul Durrant [Thu, 5 Dec 2019 17:23:09 +0000 (17:23 +0000)]
Correct the package name

XENVKBD is a 'class' driver and the package name should reflect that.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
5 years agoFix the revision table
Paul Durrant [Thu, 5 Dec 2019 17:05:39 +0000 (17:05 +0000)]
Fix the revision table

XENVKBD delegates interface queries for XENBUS_STORE and XENBUS_SUSPEND
and hence it should encode revisions for these and create PDOs with
appropriate CompatibleIDs.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
5 years agoMAINTAINERS: Update my email address 9.0.0-rc1
Paul Durrant [Thu, 14 Nov 2019 10:11:28 +0000 (10:11 +0000)]
MAINTAINERS: Update my email address

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
5 years agoAdd support for EWDK_19h1_release_svc_prod3_18362_190416-1111
Paul Durrant [Thu, 19 Sep 2019 13:34:08 +0000 (14:34 +0100)]
Add support for EWDK_19h1_release_svc_prod3_18362_190416-1111

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
5 years agoMAINTAINERS: Update my email address
Paul Durrant [Thu, 19 Sep 2019 13:22:59 +0000 (14:22 +0100)]
MAINTAINERS: Update my email address

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
5 years agoRemove the old python build scripts and document use of the EWDK
Paul Durrant [Thu, 19 Sep 2019 13:21:54 +0000 (14:21 +0100)]
Remove the old python build scripts and document use of the EWDK

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
5 years agoUse genfiles to set DriverVer
Owen Smith [Wed, 17 Jul 2019 12:52:49 +0000 (13:52 +0100)]
Use genfiles to set DriverVer

Signed-off-by: Owen Smith <owen.smith@citrix.com>
5 years agoAdd PowerShell build scripts, version.vcxproj
Owen Smith [Fri, 14 Jun 2019 15:16:06 +0000 (16:16 +0100)]
Add PowerShell build scripts, version.vcxproj

Based on the sequence of commits to xenbus, add powershell scripts to
build the solution using the EWDK
version.vcxproj generates versioned files (version.h and xenvkbd.inf) using
scripts/genfiles.ps1
Strips duplicated functionality from build.py to produce consistent
builds between python and powershell.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
5 years agoAdd BUILD_NUMBER to reported version
Owen Smith [Fri, 14 Jun 2019 14:55:26 +0000 (15:55 +0100)]
Add BUILD_NUMBER to reported version

Signed-off-by: Owen Smith <owen.smith@citrix.com>
6 years agoPort "Ignore unused devices when checking for compatability" from XENBUS
Paul Durrant [Thu, 20 Dec 2018 17:38:31 +0000 (17:38 +0000)]
Port "Ignore unused devices when checking for compatability" from XENBUS

XENBUS commit caf35361 fixes an upgrade issue with dangling references
left in ENUM keys. This patch applies the same fix to XENVKBD.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
6 years agoConditionally package DPInst
Owen Smith [Fri, 24 Aug 2018 16:46:43 +0000 (17:46 +0100)]
Conditionally package DPInst

Since DPInst.exe is not shipped with the Windows Driver Kit 10, an
environment variable must point to local copies. Make the inclusion of
DPInst conditional on DPINST_REDIST being defined and that path
existing. This simplifies building packages which do not require DPInst
for installation, and removes a required step to create a working build.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
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>