[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [win-pv-devel] Building Windows PV Drivers - Fails with Static Driver Verifier



2015-02-07 0:09 GMT+01:00 Christian Refvik <christian.refvik@xxxxxxxxxx>:

Paul,

Â

Thanks â Iâm disabling SDV and everything builds fine. However, I canât install the Xenbus package on Windows 2012 Server R2.


To use this pv driver you need at least upstream qemu 1.6, default upstream qemu of xen 4.2 is older.
To have W2012R2 full working with new winpv drivers you need xen 4.5 with ms_vm_genid="generate" in domU's xl cfg.
I have latest winpv build full working on W2012R2 domU with dom0 with xen 4.5 including 2 patches backports useful (or probably required by new pv drivers):
https://github.com/Fantu/Xen/tree/rebase/m2r-testing
Â

Â

c:\xenbits\pvdrivers\win\xenbus\xenbus\x64>dpinst /C

Â

INFO:ÂÂ Option set: dumping log info to console.

INFO:ÂÂ Current working directory: 'c:\xenbits\pvdrivers\win\xenbus\xenbus\x64'

INFO:ÂÂ Running on path 'c:\xenbits\pvdrivers\win\xenbus\xenbus\x64'

INFO:ÂÂ No valid 'dpinst.xml' file provided.

INFO:ÂÂ Found driver package: 'c:\xenbits\pvdrivers\win\xenbus\xenbus\x64\xenbus.inf'.

INFO:ÂÂ Preinstalling 'c:\xenbits\pvdrivers\win\xenbus\xenbus\x64\xenbus.inf' ...

INFO:ÂÂ ENTER:Â DriverPackagePreinstallW

INFO:ÂÂ RETURN: DriverPackagePreinstallWÂ (0xE0000247)

INFO:ÂÂ Returning with code 0x80010000

Â

Â

Â

Under Other Devices, there is a PCI Device in device manager which appears to be the XenBus:

Â

Device PCI\VEN_5853&DEV_0001&SUBSYS_00015853&REV_01\3&267a616a&2&18 was configured.

Â

Driver Name: null

Class Guid: {00000000-0000-0000-0000-000000000000}

Driver Date:

Driver Version:

Driver Provider:

Driver Section:

Driver Rank: 0x0

Matching Device Id:

Outranked Drivers:

Device Updated: false

Â

Iâm using Xen 4.2 and using the default upstream QEMU. Iâve also installed the PFX file c:\xenbits\pvdrivers\win\xenbus\src\xenbus.pfx to be sure that there is no issues validating the driver.

Â

Any help would be appreciated.Â

Â

Thanks,

Christian

Â

From: Paul Durrant [mailto:Paul.Durrant@xxxxxxxxxx]
Sent: Friday, February 6, 2015 1:55 AM
To: Christian Refvik
Cc: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Subject: RE: [win-pv-devel] Building Windows PV Drivers - Fails with Static Driver Verifier

Â

Christian,

Â

 Iâll have a look at the latest code. In general though SDV builds are a bit fragile. SDV has a tendency to leave log files locked causing weird failures on a fairly random basis. Unless you really want the SDV output Iâd recommend building without it in the normal case. If you do want the output I suggest only running it in a freshly cloned repo where it has never been run before.

Â

 Paul

Â

From: win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of Christian Refvik
Sent: 06 February 2015 00:01
To: Paul Durrant
Cc:
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Subject: [win-pv-devel] Building Windows PV Drivers - Fails with Static Driver Verifier

Â

Hi Paul,

Â

Today I tried building the Xenbus drivers with âbuild.py checkedâ, but the build fails. If I build without running SDV (Static Driver Verifier), everything is fine. ÂThere are some warnings (as shown below) and the projects in the solution are setup to treat warnings as errors.

Â

What should I do to use the SDV to verify the PV drivers? Is this a known issue and I should just disable SDV?

Â

Thanks for your help,

Christian

Â

Â

Â

Â

Â

C:\xenbits\pvdrivers\xenbus\vs2013\xen>msbuild.exe /m:1 /p:Configuration="Windows 8 Release" /p:Platform="x64" /t:"Build"Â xen.vcxproj

Microsoft (R) Build Engine version 12.0.21005.1

[Microsoft .NET Framework, version 4.0.30319.34003]

Copyright (C) Microsoft Corporation. All rights reserved.

Â

Build started 2/5/2015 3:34:26 PM.

Project "C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj" on node 1 (Build target(s)).

PrepareForBuild:

 Creating directory "..\xen\Windows8Release\x64\".

 Creating directory "..\Windows8Release\x64\".

 Creating directory "..\xen\Windows8Release\x64\xen.tlog\".

InitializeBuildStatus:

 Creating "..\xen\Windows8Release\x64\xen.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

_MASM:

 Assembling ..\..\src\xen\amd64\hypercall_thunk.asm...

 cmd.exe /C "C:\Users\christian.refvik\AppData\Local\Temp\tmp95adf46008a64d249a0db183cc77a012.cmd"

 ml64.exe /c /nologo /Zi /Fo"..\xen\Windows8Release\x64\hypercall_thunk.obj" /W3 /errorReport:prompt /Ta..\..\src\xen\amd64\hypercall_thunk.asm

_MASM:

Skipping target "_MASM" because all output files are up-to-date with respect to the input files.

CustomBuildStep:

Skipping target "CustomBuildStep" because all output files are up-to-date with respect to the input files.

ClCompile:

 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /I"C:\Program Files (x86)\Windows Kits\8.1\\include\km" /I..\xen\Windows8Release\x64\ /Zi /nologo /Wall /WX /MP /Ox /Os /Oy- /D CODE_ANALYSIS /D __x86_64__ /D "__MODULE__=\"XEN\"" /D POOL_NX_OPTIN=1 /D _WIN64 /D _AMD64_ /D AMD64 /D _WIN32_WINNT=0x0602 /D WINVER=0x0602 /D WINNT=1 /D NTDDI_VERSION=0x06020000 /D _AMD64_ /GF /Gm- /Zp8 /GS /Gy /fp:precise

 registry.c

 driver.c

 event_channel.c

 grant_table.c

 hvm.c

 xen_version.c

 hypercall.c

 memory.c

 sched.c

 log.c

 bug_check.c

 module.c

 process.c

 acpi.c

 system.c

ResourceCompile:

 C:\Program Files (x86)\Windows Kits\8.1\bin\x86\rc.exe /D _WIN64 /D _AMD64_=1 /D AMD64 /D _WIN32_WINNT=0x0602 /D WINVER=0x0602 /D WINNT=1 /D NTDDI_VERSION=0x06020000 /l"0x0409" /I"C:\Program Files (x86)\Windows Kits\8.1\Include\UM" /I..\xen\Windows8Release\x64\ /nologo /fo"..\xen\Windows8Release\x64\xen.res" ..\..\src\xen\xen.rc

Link:

 C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:"..\Windows8Release\x64\xen.sys" /VERSION:"6.3" /INCREMENTAL:NO /NOLOGO /WX /SECTION:"INIT,d" "C:\Program Files (x86)\Windows Kits\8.1\lib\win8\KM\x64/libcntpr.lib" "C:\Program Files (x86)\Windows Kits\8.1\lib\win8\KM\x64/aux_klib.lib" "C:\Program Files (x86)\Windows Kits\8.1\lib\win8\KM\x64\BufferOverflowFastFailK.lib" "C:\Pro

Â..\xen\Windows8Release\x64\xen.res

 ..\xen\Windows8Release\x64\registry.obj

 ..\xen\Windows8Release\x64\driver.obj

 ..\xen\Windows8Release\x64\event_channel.obj

 ..\xen\Windows8Release\x64\grant_table.obj

 ..\xen\Windows8Release\x64\hvm.obj

 ..\xen\Windows8Release\x64\xen_version.obj

 ..\xen\Windows8Release\x64\hypercall.obj

 ..\xen\Windows8Release\x64\memory.obj

 ..\xen\Windows8Release\x64\sched.obj

 ..\xen\Windows8Release\x64\log.obj

 ..\xen\Windows8Release\x64\bug_check.obj

 ..\xen\Windows8Release\x64\module.obj

 ..\xen\Windows8Release\x64\process.obj

 ..\xen\Windows8Release\x64\acpi.obj

 ..\xen\Windows8Release\x64\system.obj

ÂÂÂÂ Creating library ..\Windows8Release\x64\xen.lib and object ..\Windows8Release\x64\xen.exp

 xen.vcxproj -> C:\xenbits\pvdrivers\xenbus\vs2013\xen\..\Windows8Release\x64\xen.sys

DriverTestSign:

 Sign Inputs: C:\xenbits\pvdrivers\xenbus\vs2013\xen\..\Windows8Release\x64\xen.sys

 C:\Program Files (x86)\Windows Kits\8.1\bin\x86\signtool.exe sign /ph /sha1 "337D411D5F99F4EED21E8E88BF82CDC8AF3F64F5"

 Done Adding Additional Store

 Successfully signed: C:\xenbits\pvdrivers\xenbus\vs2013\xen\..\Windows8Release\x64\xen.sys

Â

 Certificate used for signing: issued to = XENBUS (TEST) and thumbprint = 337D411D5F99F4EED21E8E88BF82CDC8AF3F64F5

 Exported Certificate: ..\Windows8Release\x64\xen.cer

c:\xenbits\pvdrivers\xenbus\src\common\registry.c(178): warning C6102: Using 'Length' from failed function call at line '175'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

c:\xenbits\pvdrivers\xenbus\src\common\registry.c(368): warning C6102: Using 'Size' from failed function call at line '364'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

c:\xenbits\pvdrivers\xenbus\src\common\registry.c(469): warning C6102: Using 'Size' from failed function call at line '465'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

c:\xenbits\pvdrivers\xenbus\src\common\registry.c(602): warning C6102: Using 'Size' from failed function call at line '598'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

c:\xenbits\pvdrivers\xenbus\src\common\registry.c(827): warning C6102: Using 'Size' from failed function call at line '823'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

c:\xenbits\pvdrivers\xenbus\src\common\registry.c(899): warning C6102: Using 'Size' from failed function call at line '894'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

FinalizeBuildStatus:

 Deleting file "..\xen\Windows8Release\x64\xen.tlog\unsuccessfulbuild".

 Touching "..\xen\Windows8Release\x64\xen.tlog\xen.lastbuildstate".

Done Building Project "C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj" (Build target(s)).

Â

Build succeeded.

Â

"C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj" (Build target) (1) ->

(RunNativeCodeAnalysis target) ->

 c:\xenbits\pvdrivers\xenbus\src\common\registry.c(178): warning C6102: Using 'Length' from failed function call at line '175'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

 c:\xenbits\pvdrivers\xenbus\src\common\registry.c(368): warning C6102: Using 'Size' from failed function call at line '364'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

 c:\xenbits\pvdrivers\xenbus\src\common\registry.c(469): warning C6102: Using 'Size' from failed function call at line '465'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

 c:\xenbits\pvdrivers\xenbus\src\common\registry.c(602): warning C6102: Using 'Size' from failed function call at line '598'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

 c:\xenbits\pvdrivers\xenbus\src\common\registry.c(827): warning C6102: Using 'Size' from failed function call at line '823'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

 c:\xenbits\pvdrivers\xenbus\src\common\registry.c(899): warning C6102: Using 'Size' from failed function call at line '894'. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

Â

ÂÂÂ 6 Warning(s)

ÂÂÂ 0 Error(s)

Â

Time Elapsed 00:00:05.74

Â

C:\xenbits\pvdrivers\xenbus\vs2013\xen>if errorlevel 1 goto error

Â

C:\xenbits\pvdrivers\xenbus\vs2013\xen>exit 0

['vs2013', 'xen', 'sdv']

['vs2013', 'xen', 'sdv.temp']

['vs2013', 'xen', 'staticdv.job']

['vs2013', 'xen', 'refine.sdv']

['vs2013', 'xen', 'sdv-map.h']

vs2013\xen

['C:\\Users\\christian.refvik\\Development\\xenbits\\pvdrivers\\xenbus\\msbuild.bat']

Â

C:\xenbits\pvdrivers\xenbus\vs2013\xen>call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86

Â

C:\xenbits\pvdrivers\xenbus\vs2013\xen>msbuild.exe /m:1 /p:Configuration="Windows 8 Release" /p:Platform="x64" /t:"sdv" /p:Inputs="/scan" xen.vcxproj

Microsoft (R) Build Engine version 12.0.21005.1

[Microsoft .NET Framework, version 4.0.30319.34003]

Copyright (C) Microsoft Corporation. All rights reserved.

Â

Build started 2/5/2015 3:34:32 PM.

Project "C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj" on node 1 (sdv target(s)).

sdv:

 staticdv.exe /scan

 ---------------------------------------------------------------------

 Microsoft (R) Windows (R) Static Driver Verifier Version 4.0.500.1

 Copyright (C) Microsoft Corporation. All rights reserved.

 ---------------------------------------------------------------------

 SDV is building for <Windows 8 Release|x64>

 SDV is building for <Windows 8 Release|x64>

 The call to "Build" failed.

EXEC : Build warning : ..\..\src\common\registry.c(224): error C2220: warning treated as error - no 'object' file generated [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj] [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

Â

EXEC : Build warning : ..\..\src\common\registry.c(224): error C2220: warning treated as error - no 'object' file generated [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj] [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

Â

 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\8.1\build\windowsdriver.Sdv.targets(65,9): error MSB3075: The command "staticdv.exe /scan" exited with code 5. Please verify that you have sufficient rights to run this command. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

Done Building Project "C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj" (sdv target(s)) -- FAILED.

Â

Build FAILED.

Â

"C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj" (sdv target) (1) ->

(sdv target) ->

 EXEC : Build warning : ..\..\src\common\registry.c(224): error C2220: warning treated as error - no 'object' file generated [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj] [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

 EXEC : Build warning : ..\..\src\common\registry.c(224): error C2220: warning treated as error - no 'object' file generated [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj] [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

Â

Â

"C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj" (sdv target) (1) ->

(sdv target) ->

 C:\Program Files (x86)\Windows Kits\8.1\build\windowsdriver.Sdv.targets(65,9): error MSB3075: The command "staticdv.exe /scan" exited with code 5. Please verify that you have sufficient rights to run this command. [C:\xenbits\pvdrivers\xenbus\vs2013\xen\xen.vcxproj]

Â

ÂÂÂ 2 Warning(s)

ÂÂÂ 1 Error(s)

Â

Time Elapsed 00:00:06.51

Â

C:\xenbits\pvdrivers\xenbus\vs2013\xen>if errorlevel 1 goto error

Â

C:\xenbits\pvdrivers\xenbus\vs2013\xen>exit 1

Traceback (most recent call last):

 File "C:\xenbits\pvdrivers\xenbus\build.py", line 370, in <module>

ÂÂÂ run_sdv('xen', driver, vs)

 File "C:\xenbits\pvdrivers\xenbus\build.py", line 204, in run_sdv

ÂÂÂ '/p:Inputs="/scan"', os.path.join(vs, name))

 File "C:\xenbits\pvdrivers\xenbus\build.py", line 124, in msbuild

ÂÂÂ raise msbuild_failure(configuration)

__main__.msbuild_failure: 'Windows 8 Release'

Â

C:\xenbits\pvdrivers\xenbus>

Â


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.