[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



Hi Paul and Fabio,

 

I haven’t reported back, but I wanted to let you know what I did:

 

1.       All the Windows PV drivers build successfully with ‘build.py free nosdv’

2.       Enabled Test Build

a.       Opened the command prompt as Administrator

b.      bcdedit.exe –set TESTSIGNING ON

c.       Reboot

3.       Installed XenBus and Reboot

4.       Installed XenIface and Reboot

 

When I installed either XenNet or XenVbd, this caused a hard crash on reboot.  The way to work around this issue is to reboot into a Last Known Good configuration and uninstall XenNet and XenVbd.  I do not know what the issue is at this point.  I have updated to Xen 4.5 and I’m using CentOS 7 with a Xen enabled kernel configuration.  My DomU is Windows 2012 R2.

 

Although I’ve enabled netbk and blkbk in the CentOS 7 kernel, how do I verify if these devices are successfully running in Dom0?

 

Thanks,

Christian

 

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

 

Hi Christian,

 

  The cert is a test cert so you’ll also need to make sure testsigning is on. It may be that dpinst is vetoing installation of a test signed boot start driver unless testsigning has already been enabled (it certainly pops up a dialog warning of this if you don’t use /C). I’ll see if I can repro what you’re seeing though. There’s probably more info on the failure in c:\windows\inf\setupapi.dev.log too.

 

  Paul

 

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

 

Paul,

 

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

 

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

 


Rackspace

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