Commit Graph
86 Commits
Author SHA1 Message Date
Ilya Rudakov 638ba85503 Virtio vsock support for Windows guests, initial commit.
Just a stub for further development. Build is ok, but without packaging
yet, a project set is defined (device driver, Windows Sockets service
provider interface (SPI) client for user mode apps, driver test app).
Device initialization is partially implemented, virtqueues are not
ready, you can only get the CID. The socket service provider client
implemented as a dll, it will handle requests from Windows Socket
subsystem, at the moment this is just a stub for building. Common
read/write requests will be used to communicate with the driver,
connection parameters will be defined with extended file attributes on
open.

Signed-off-by: Ilya Rudakov <[email protected]>
2019-12-02 09:47:16 +02:00
Yuri Benditovich 012e122cee build: support Community and Professional VS 2017
For Brew build and other configurations which use
Professional VS.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-04-23 16:40:12 +03:00
Yuri Benditovich 9f913e9d9f build: do not use '/uselocaltime' switch with legacy build
This causes inf2cat to fail with message 'Parameter format not
correct' if by chance there is no modern inf2cat version in the
executable path

Signed-off-by: Yuri Benditovich <[email protected]>
2019-04-23 16:40:12 +03:00
Ilya Rudakov 276851f249 build: Add VerArch property for ARM64
Signed-off-by: Ilya Rudakov <[email protected]>
2019-04-23 16:40:12 +03:00
Yuri Benditovich 74fa29d99b build: enable Spectre mitigation
Signed-off-by: Yuri Benditovich <[email protected]>
2019-04-23 16:40:12 +03:00
Yuri Benditovich a66c3c52b3 build: add ARM64 to build
Signed-off-by: Yuri Benditovich <[email protected]>
2019-04-23 16:40:12 +03:00
Yuri Benditovich 5c05a873d9 build: instrument common XMLs for ARM64
Signed-off-by: Yuri Benditovich <[email protected]>
2019-04-23 16:40:12 +03:00
Yuri Benditovich b78728c1bd build: Run SDV with WDK 1809 and VS 2017
SDV of WDK 1809 is changed and first expected parameter
for 'check' flow should be '/check'.
The SDV build using WDK 1809 crashes during check of NetKVM,
without producing suitable logs, this will be investigated
later with Microsoft. For now in order to have SDV and DVL
logs we run the SDV in legacy mode (similar to older WDK),
when all the tests of SDV pass.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-04-23 16:40:12 +03:00
Yuri Benditovich ab5396a638 Fix setting environment by 2017 (not using VS2015)
Instead of calling calling VS2015 'setvars' batch call
batch file that calls 2017 batch for the same.

Signed-off-by: Yuri Benditovich <[email protected]>
2019-04-23 16:40:12 +03:00
Yuri Benditovich 5f005e252a 2017 studio and latest WDK
Signed-off-by: Yuri Benditovich <[email protected]>
2019-04-23 16:40:12 +03:00
Mihai Carabas b9f72604fc Tools: Driver.Vendor.props: current year to 2019 2019-02-06 19:50:29 +02:00
Gal Hammer cb822e36bf Fix LICENSE and source files license inconsistency.
virtio-win is released under the 3-clause BSD License. Make sure
both LICENSE and source files state that.

Reported-by: Darren Kenny
2019-01-31 15:06:33 +02:00
Lior Haim 138cdbeeeb Tools: Fix the test certificate
This commit adds a new certificate created with the following commands:
makecert -n "CN=Virto test certificate" -ss root -r -pe -sv VirtIOTestCert.pvk -b 12/12/2018 VirtIOTestCert.cer
pvk2pfx.exe -pvk VirtIOTestCert.pvk -spc VirtIOTestCert.cer -pfx VirtIOTestCert.pfx

the new cert solves an issue with the certification validity.

Signed-off-by: Lior Haim <[email protected]>
2018-12-19 15:41:37 +02:00
Sameeh Jubran fe0585e673 Tools: VirtioTestCert: Fix test signing
This reverts commit 8d2fd31421c5722ebbd43bff140692bc22b45969.

This commit reverts using .cer instead of .pfx and adds the pfx file back
and adds a new generated certificate.

The certificate/pfx was generated using the following commands:

makecert.exe -n "CN=CARoot" -ss root -r -pe -a sha512 -len 4096 -cy
authority -sv VirtIOTestCert.pvk -b 12/12/2018 VirtIOTestCert.cer

pvk2pfx.exe -pvk VirtIOTestCert.pvk -spc VirtIOTestCert.cer -pfx
VirtIOTestCert.pfx
2018-12-17 17:26:43 +02:00
Sameeh Jubran f89f2dabd6 Test Certificate: Create a new test certificate
The old certificate has expired, this commit drops the old one and adds a
new one.

The new certificate automatically adds itself to the Trusted Root
Certificate Authorities store.

The certificate was created using the
following command line:

makecert -r -pe -ss root -n CN="Virto test certificate" VirtIOTestCert.cer

This commit also drops the pfx file which is not needed.

Signed-off-by: Sameeh Jubran <[email protected]>
2018-12-17 12:34:54 +02:00
Sameeh Jubran 91ca5f3f8c Tool: SignAll script: Use .cer instead of .pfx
In general we can use both files to sign the drivers with, since the
pfx file is not needed we can use the .cer instead.

Signed-off-by: Sameeh Jubran <[email protected]>
2018-12-17 12:34:54 +02:00
Yuri Benditovich 563cedc052 netkvm: solve problem building projects when higher WDK was installed
This commit is preparation for build with VS2017, which requires
WDK higher than 15063 to be installed.
When VS2015 and VS2017 coexist and VS2015 is used for drivers
build, but higher WDK(s) are also installed, the files under
"Windows Kits\10\build" are modified causing failure when build runs.
Current commit fixes it by importing Driver.Initial.props prior
to any other imported project. In order to ensure proper order of
importing projects, we remove direct importing of Visual studio
.props files and now each driver package project includes
only its own .props file and Tools\Driver.Common.props file,
which includes Visual Studio .props files and Driver.Initial.props
file in proper order.

Signed-off-by: Yuri Benditovich <[email protected]>
2018-11-09 23:23:31 +02:00
Vadim Rozenfeld 8f41f3a431 [vioscs] WPP for virtio-scsi device driver 2018-06-06 21:43:06 +03:00
Vadim Rozenfeld 4395ffc5aa viostor batch file for collecting trace information 2018-06-05 13:46:44 +03:00
Sameeh Jubran 45a48dc54a WPP Tracing: Set wppmodulename as target name
The wppmodulename is the friendly name of the message GUID. The
friendly name of the message GUID appears, by default, in the trace
message prefix.

By default, the friendly name of the message GUID is the name of
the directory in which the trace provider was built, this causes
some drivers as "sys". This commit overrides the default value
by setting the wppmodulename to be target name.

Signed-off-by: Sameeh Jubran <[email protected]>
2018-04-29 14:51:31 +03:00
Viktor Prutyanov 53b9223710 fwcfg64: add fwcfg driver
This patch adds QEMU fw-cfg device driver.
The driver can expose Windows crashdump header to QEMU through
fw-cfg 'etc/vmcoreinfo' entry.

Signed-off-by: Viktor Prutyanov <[email protected]>
2018-04-16 16:41:01 +03:00
Yuri Benditovich 6eff34c9a8 build: change current copyright year to 2018
Signed-off-by: Yuri Benditovich <[email protected]>
2018-04-06 18:44:02 +03:00
Yuri Benditovich c8e9d690e9 build: add properties definitions for viocrypt driver
This change does not affect the build, just adds viocrypt-
specific definitions for proper versioning.

Signed-off-by: Yuri Benditovich <[email protected]>
2018-04-06 18:44:02 +03:00
Yuri Benditovich 3fb75d8093 build: correct and simplify copyright string generation
Add single correct definition for copyright years and
propagate it during build to RC compiler

Signed-off-by: Yuri Benditovich <[email protected]>
2018-04-06 18:44:02 +03:00
Sameeh Jubran a23ff6de43 Tools: Move pdb related script to Trace dir
Signed-off-by: Sameeh Jubran <[email protected]>
2018-03-25 11:02:16 +03:00
Sameeh Jubran 77e7d11db0 Tools: CollectTrace.bat: Add .etl suffix to filenames
Signed-off-by: Sameeh Jubran <[email protected]>
2018-03-25 11:02:16 +03:00
Sameeh Jubran 0177632d31 Tools: Trace: Fix ParseTrace script
Signed-off-by: Sameeh Jubran <[email protected]>
2018-03-24 22:47:57 +03:00
20lives f53f3e03b4 Dealing with white spaces in files path on cert sign script
Signed-off-by: 20lives <[email protected]>
2018-03-19 14:40:34 +02:00
20lives bf4eb62f15 adding a certificate sign script to all drivers
Signed-off-by: 20lives <[email protected]>
2018-03-19 10:52:22 +02:00
Yan Vugenfirer cdfcf7fc95 Run inf2cat with localtime command line option
Due to the time difference between local time and UTC, compilation might fail.

Signed-off-by: Yan Vugenfirer <[email protected]>
2018-03-12 16:47:30 +02:00
Sameeh Jubran f5fada0937 Tools: Trace: Add a trace collector script for each driver
This commit enhances the log collection automation furthermore by
providing a single script for each driver.

Signed-off-by: Sameeh Jubran <[email protected]>
2018-03-12 14:48:31 +02:00
Sameeh Jubran d753a471e5 Tools: Add scripts for collecting/parsing traces
This commit introduces two scripts:

collectTrace.bat:

This script automate the process of collecting traces for
the drivers that support WPP tracing. PDB files aren't needed
for the script, the files can then be viewed using the following
script.

parseTrace.bat

This script parses the data captured by the previous one, it requires
the presence of the tools: Tracepdb.exe and Tracefmt.exe which can be
found in the path:

C:\Program Files (x86)\Windows Kits\<Kit version>\bin\<ARCH>\

The script requires two parameters for executing: pdb file that
matches the build and the etl file that was collected on a machine
that runs the suitable build.

Signed-off-by: Sameeh Jubran <[email protected]>
2018-03-12 14:48:31 +02:00
Ilya Rudakov 404f629635 build: Change company name and vendor ID for VZ vendor
Replacing company name with "Virtuozzo International GmbH".
Using 1DF0 as a Subsystem Vendor ID.

Signed-off-by: Ilya Rudakov <[email protected]>
2018-02-04 14:21:31 +02:00
Yan Vugenfirer 803f471615 All drivers for Windows 10 will be built for "Universal" target platform
Signed-off-by: Yan Vugenfirer <[email protected]>
2018-01-28 19:17:46 +02:00
Vadim Rozenfeld 30bd8ae29a add Win8.1 WDF Coinstaller placeholder 2018-01-22 09:48:38 +02:00
Bishara AbuHattoum 41730fe11f NetKVM: A new script tool to extract info from pdb
Script tool to extract info from a pdb symbol file,
 info includes the WPP provider's control GUID,
 enabled flags and level, "getpdbinfo.bat /?" for usage.

Signed-off-by: Bishara AbuHattoum <[email protected]>
2018-01-11 14:27:13 +02:00
Ilya Rudakov e36156275b build: PackOne cosmetic changes
Add single quotes to PackOne target description to match code style

Signed-off-by: Ilya Rudakov <[email protected]>
2017-11-29 18:22:09 +02:00
Ilya Rudakov d586b570c1 build: Debug config support for PackOne
Now PackOne takes files from objchk_* and copy them to Install_Debug
when project configuration name ends with "Debug". It's required for
NDIS5 driver build.

Also, PackOne source and dest can be overrided in the project
configuration.

Signed-off-by: Ilya Rudakov <[email protected]>
2017-11-29 18:22:09 +02:00
Ilya Rudakov 3f760a2845 NetKVM: rename .inf during build for Win7 config
netkvm_no_RSC.inf should be renamed to netkvm.inf after
adjustment and before copy to install dir, but this step was
performed only for AdjustInf_LegacyDDK target.

AdjustInf_WDK target now uses a Copy task with non-empty
TargetInfFile property as a trigger. TargetInfFile property
is added to Win7 configs of NetKVM.

Signed-off-by: Ilya Rudakov <[email protected]>
2017-11-09 17:13:20 +02:00
Ilya Rudakov bbeb04865e build: adjust "legacy" .inf before build
AdjustInf_LegacyDDK target is executed after PostBuildStep, which
is used to copy driver files to Install dir. And there is no .inf
to copy because file it is not adjusted (and not renamed) yet, thus
legacy .inf should be adjusted before Build target execution.

AdjustInf_WDK for win10 WDK is executed after built-in StampInf target
and before build, thus it's ok to place AdjustInf_LegacyDDK and
StampInf_LegacyDDK before build too.

Signed-off-by: Ilya Rudakov <[email protected]>
2017-11-09 17:13:20 +02:00
Ilya Rudakov 520e63ea47 NetKVM: NDIS6 driver support for multiple vendors
Support for vendor and copyright strings substitution for
.inf and resources. No changes in driver packing.

Signed-off-by: Ilya Rudakov <[email protected]>
2017-11-09 17:13:20 +02:00
Ladi Prosek ebaa408206 ivshmem: Enable Feature_AdjustInf for ivshmem.inf
Turns on .inf rewriting for the driver, allowing us to use the subsystem
vendor ID validation task among other things.

Signed-off-by: Ladi Prosek <[email protected]>
2017-11-08 15:51:26 +02:00
Ladi Prosek 4253ed29ac Add a SUBSYSTEM_VENDOR_ID validation task
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 adds a simple validation task to issue a build warning in
case a vendor that is not Red Hat tries to use the default subsystem vendor
ID of 1AF4.

Signed-off-by: Ladi Prosek <[email protected]>
2017-11-08 15:51:26 +02:00
Ladi Prosek 7c5c36a96b Introduce SUBSYSTEM_VENDOR_ID
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]>
2017-11-08 15:51:26 +02:00
Sameeh Jubran 77cfa21f3a Inf2cat: Use /uselocaltime when compiling
The inf2cat tool uses the UTC timezone by default for timestamp comparison,
this can cause the following error when there is a mismatch between time on
the build machine is and the one in UTC timezone. Using /uselocaltime
parameter solves this issue.

Inf2cat error:

* DriverVer set to incorrect date (postdated DriverVer not allowed) in
\netkvm.inf. The current date (UTC) is 01/01/2017.

Signed-off-by: Sameeh Jubran <[email protected]>
2017-11-07 17:04:03 +02:00
Ladi Prosek 2ddc0c3481 build: Eliminate vendor.check.h
Now that the build system has proven stable, the check header is
no longer needed. Also lowering the importance of "Adding {0}=>{1}"
messages produced by the SubstituteFileContent task to Low to cut
down on verbosity.

Signed-off-by: Ladi Prosek <[email protected]>
2017-09-17 13:22:34 +02:00
Ladi Prosek 825e80c789 Fix build break with WDK 10.0.15063.0
stampinf.exe in the latest Win10 WDK appears to have a bug and writes
out an empty DriverVer= directive when passed a command line like below:

  stampinf -f <inf> -a <arch> -v <version>

Adding -d seems to work around it:

  stampinf -f <inf> -a <arch> -v <version> -d *

Signed-off-by: Ladi Prosek <[email protected]>
2017-08-29 12:04:43 +02:00
Yan Vugenfirer b8f8cc073c BZ#1480139 - Switch to BSD license
The project is switching from GPL to BSD.

Signed-off-by: Yan Vugenfirer <[email protected]>
2017-08-14 10:59:48 +03:00
Ladi Prosek e4d829a0b3 misc: Switch to BSD license
The project is switching from GPL to BSD.

Signed-off-by: Ladi Prosek <[email protected]>
2017-08-08 11:28:16 +03:00
Dmitry Fleytman 603ddd6b49 build: Add flow explanations to build.bat
Signed-off-by: Dmitry Fleytman <[email protected]>
2017-06-14 11:41:21 +03:00