From: Ben Chalmers Date: Fri, 21 Jun 2013 13:54:35 +0000 (+0100) Subject: Resync with internal repository X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d1337e3f939c1753769e2c0eeb48b530f5718fd2;p=people%2Fpauldu%2Fxenbus.git Resync with internal repository changeset: 305:e377a99e8721 tag: tip user: Paul Durrant date: Fri Jun 21 13:19:15 2013 +0100 summary: [CA-109475] Handle __RangeSetAdd failure. changeset: 304:7818aaf86215 parent: 303:37f03f68abf5 parent: 302:b576d67847cb user: Paul Durrant date: Fri Jun 21 09:58:03 2013 +0100 summary: Merge changeset: 303:37f03f68abf5 parent: 299:f17689532d11 user: Paul Durrant date: Fri Jun 21 09:57:04 2013 +0100 summary: * * * changeset: 302:b576d67847cb user: Ben Chalmers date: Wed Jun 19 10:30:32 2013 +0100 summary: [CP-4195] Add README.md and associated files to xenbus changeset: 301:407589c56880 user: Owen Smith date: Thu Jun 13 16:07:04 2013 +0100 summary: Fix/suppress SDV warnings changeset: 300:966e06420ce5 user: Owen Smith date: Wed Jun 12 16:48:22 2013 +0100 summary: [CA-86240] Update sdv.py and vcxprojs to build targetting Vista, an d attempt to produce sdv logs changeset: 299:f17689532d11 user: Owen Smith date: Thu Jun 06 12:47:30 2013 +0100 summary: Backed out merge changeset: b35edbab18ee changeset: 298:b35edbab18ee parent: 297:0675b68b3e8d parent: 296:5aefe3d5985a user: Owen Smith date: Tue Jun 04 12:18:12 2013 +0100 summary: Merge changeset: 297:0675b68b3e8d parent: 294:28a400f3d92a user: Owen Smith date: Tue Jun 04 12:17:26 2013 +0100 summary: [CA-86240] Generate SDV logs with sdv.py script changeset: 296:5aefe3d5985a parent: 295:0fad50b631e3 parent: 294:28a400f3d92a user: Paul Durrant date: Mon Jun 03 17:49:00 2013 +0100 summary: Merge changeset: 295:0fad50b631e3 parent: 293:5c23adc1aa58 user: Paul Durrant date: Mon Jun 03 17:48:06 2013 +0100 summary: Fix line endings changeset: 294:28a400f3d92a user: Ben Chalmers date: Wed May 29 14:57:17 2013 +0100 summary: [CP-4685] Add BSD licence header to inf file --- diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..00bf1f8 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,2 @@ +7.0.0 (2013-06-19): +* Initial public release diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..233d411 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,12 @@ +To install the XenServer Paravitual Bus Device Driver onto a XenServer Windows +guest VM: + +* Copy xenbus.sys, xen.sys, xenfilt.sys, xenbus_coinst.dll and xenbus.inf + onto the guest VM +* Copy dpinst.exe from the Windows driver kit into the same folder as + xenbus.sys, xen.sys, xenfilt.sys, xenbus_coinst.dll and xeniface.inf on + the guest vm, ensuring the version of dpinst.exe matches the architecture + of the verison of Windows installed on your VM +* As administrator, run dpinst.exe on the guest vm +* If any warnings arise about unknown certificates, accept them + diff --git a/MAINTAINERS b/MAINTAINERS new file mode 100644 index 0000000..e1e3564 --- /dev/null +++ b/MAINTAINERS @@ -0,0 +1,40 @@ +List of maintainers and how to submit changes +============================================= + +This is an early public release of the XenServer XenBus drivers. + +At the moment we are working hard on improving this early release, to make +it easier to build and install and test on your own systems. As such things +are in a state of flux, and we may well find it difficult to take submissions. + +We hope things will have improved by January 2014 + +If you do wish to submit code, we recommend reaching out to the maintainers +first, who will attempt to steer you in the right direction. + +We also request you follow these guidelines: + +1. All submissions must be made under the terms of the "Developer's Certificate + of Origin" (DC) and should include a Signed-off-by: line. + +2. All Submissions should use Unix line endings for consitency with the rest of + the XenServer project + +3. Each patch should include a descriptive commit comment that helps understand + why the patch is necessary and why it works. This will be used both for + initial review and for new people to understand how the code works later + +4. Make sure you have the right to submit any changes you make. If you do + changes at work you may find your employer owns the patches instead of + you. + + +Maintainers List +---------------- + +* Paul Durrant + +* Ben Chalmers + +* Owen Smith + diff --git a/README.md b/README.md new file mode 100644 index 0000000..0ec678a --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +XenBus - The XenServer Windows Paravitual Bus Device Driver +========================================== + +XenBus consists of three device drivers: + +* XenBus.Sys is a bus driver which attaches to a virtual device on the PCI + bus and provides child devices for the other XenServer device drivers to + attach to. + +* Xen.Sys is a support library which provides interfaces for communicating + with the XenServer host and hypervisor + +* XenFile is a filter driver which is used to mask emulated devices (such + as disk and network devices) from Windows, when paravitulized devices + are available + +Quick Start +=========== + +Prerequisites to build +---------------------- + +* Visual Studio 2012 or later +* Windows Driver Kit 8 or later +* Python 3 or later + +Environment variables used in building driver +----------------------------- + +MAJOR\_VERSION Major version number + +MINOR\_VERSION Minor version number + +MICRO\_VERSION Micro version number + +BUILD\_NUMBER Build number + +SYMBOL\_SERVER location of a writable symbol server directory + +KIT location of the Windows driver kit + +PROCESSOR\_ARCHITECTURE x86 or x64 + +VS location of visual studio + +Commands to build +----------------- + + git clone http://github.com/xenserver/win-xenbus + cd win-xenbus + .\build.py [checked | free] + +Device tree diagram +------------------- + + + | | + XenBus--(Xen.Sys) [====XenFilt===] + | | | | | | | + PCI Bus :---------+-----------------------------+--+--+--+--+--+ + VEN_5853&DEV_0002&SUBSYS_00025853 Other Devices diff --git a/build.py b/build.py index 1d7d32b..613149b 100644 --- a/build.py +++ b/build.py @@ -154,8 +154,8 @@ def get_configuration_name(debug): def get_target_path(arch, debug): configuration = get_configuration_name(debug) - target = { 'x86': 'proj', 'x64': os.sep.join(['proj', 'x64']) } - target_path = os.sep.join([target[arch], configuration]) + target = { 'x86': os.sep.join([configuration, 'Win32']), 'x64': os.sep.join([configuration, 'x64']) } + target_path = os.sep.join(['proj', target[arch]]) return target_path @@ -182,8 +182,6 @@ def msbuild(name, arch, debug): cwd = os.getcwd() configuration = get_configuration(debug) - os.environ['SOLUTION'] = name - if arch == 'x86': os.environ['PLATFORM'] = 'Win32' elif arch == 'x64': @@ -191,6 +189,8 @@ def msbuild(name, arch, debug): os.environ['CONFIGURATION'] = configuration os.environ['TARGET'] = 'Build' + os.environ['BUILD_ARGS'] = '/p:SignMode="ProductionSign"' + os.environ['BUILD_FILE'] = name + '.sln' os.chdir('proj') status = shell('msbuild.bat') diff --git a/proj/configs.props b/proj/configs.props new file mode 100644 index 0000000..2567bcf --- /dev/null +++ b/proj/configs.props @@ -0,0 +1,53 @@ + + + + + Windows 8 Debug + Win32 + + + Windows 7 Debug + Win32 + + + Windows Vista Debug + Win32 + + + Windows 8 Release + Win32 + + + Windows 7 Release + Win32 + + + Windows Vista Release + Win32 + + + Windows8 Debug + x64 + + + Windows 7 Debug + x64 + + + Windows Vista Debug + x64 + + + Windows 8 Release + x64 + + + Windows 7 Release + x64 + + + Windows Vista Release + x64 + + + \ No newline at end of file diff --git a/proj/msbuild.bat b/proj/msbuild.bat index 0d3f6cb..143feb1 100644 --- a/proj/msbuild.bat +++ b/proj/msbuild.bat @@ -1,5 +1,5 @@ call "%VS%\VC\vcvarsall.bat" x86 -msbuild.exe /m:4 /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /t:"%TARGET%" /p:SignMode="ProductionSign" %SOLUTION%.sln +msbuild.exe /m:4 /p:Configuration="%CONFIGURATION%" /p:Platform="%PLATFORM%" /t:"%TARGET%" %BUILD_ARGS% %BUILD_FILE% if errorlevel 1 goto error exit 0 diff --git a/proj/msbuild_dvl.bat b/proj/msbuild_dvl.bat deleted file mode 100644 index 4c256b2..0000000 --- a/proj/msbuild_dvl.bat +++ /dev/null @@ -1,8 +0,0 @@ -call "%VS%\VC\vcvarsall.bat" x86 -echo msbuild.exe "%SDV_PROJ%" /t:dvl /p:Configuration="Windows 8 Release" /p:Platform=x64 -msbuild.exe "%SDV_PROJ%" /t:dvl /p:Configuration="Windows 8 Release" /p:Platform=x64 -if errorlevel 1 goto error -exit 0 - -:error -exit 1 diff --git a/proj/msbuild_sdv.bat b/proj/msbuild_sdv.bat deleted file mode 100644 index b3b7202..0000000 --- a/proj/msbuild_sdv.bat +++ /dev/null @@ -1,8 +0,0 @@ -call "%VS%\VC\vcvarsall.bat" x86 -echo msbuild.exe "%SDV_PROJ%" /t:sdv /p:Inputs="%SDV_ARG%" /p:Configuration="Windows 8 Release" /p:Platform=x64 -msbuild.exe "%SDV_PROJ%" /t:sdv /p:Inputs="%SDV_ARG%" /p:Configuration="Windows 8 Release" /p:Platform=x64 -if errorlevel 1 goto error -exit 0 - -:error -exit 1 diff --git a/proj/package/package.vcxproj b/proj/package/package.vcxproj index 8decac2..15d84d7 100644 --- a/proj/package/package.vcxproj +++ b/proj/package/package.vcxproj @@ -1,163 +1,67 @@ - - - Windows Developer Preview Debug - Win32 - - - Windows Developer Preview Release - Win32 - - - Windows 7 Debug - Win32 - - - Windows 7 Release - Win32 - - - Windows Vista Debug - Win32 - - - Windows Vista Release - Win32 - - - Windows Developer Preview Debug - x64 - - - Windows Developer Preview Release - x64 - - - Windows 7 Debug - x64 - - - Windows 7 Release - x64 - - - Windows Vista Debug - x64 - - - Windows Vista Release - x64 - - - - {92E5A46B-913C-45C6-B6F8-7E062D85279F} - v4.5 - 11.0 - - - WindowsKernelModeDriver8.0 - Utility - Package - Windows Developer Preview Debug - true - - - - Windows8 - true - - - Windows8 - false - - - Windows7 - true - - - Windows7 - false - - - Vista - true - - - Vista - false - - - Windows8 - true - - - Windows8 - false - - - Windows7 - true - - - Windows7 - false - - - Vista - true - - - Vista - false - - - - - - - - - - true - Vista_$(DDKPlatform);7_$(DDKPlatform);Server2008_$(DDKPlatform);Server2008R2_$(DDKPlatform) - Vista_$(DDKPlatform);7_$(DDKPlatform);Server2008_$(DDKPlatform) - - - DbgengKernelDebugger - False - False - None - - - - - - %PathToInf% - False - False - True - - 133563 - ..\..\xenbus\$(DDKPlatform) - - - - {d7411b2c-2c43-434d-9f56-e10a3d2f5bad} - - - {4bf41378-c01b-4002-8581-563c5f703362} - - - {14c16c29-77c9-475b-a618-1b01e67cf985} - - - {9c6a5d48-a331-4b1f-a004-7bb67ba5be1c} - - - - - - - - \ No newline at end of file + + + + WDM + WindowsKernelModeDriver8.0 + Utility + Package + true + + + Windows Vista Debug + Win32 + DbgengKernelDebugger + + + + + + {92E5A46B-913C-45C6-B6F8-7E062D85279F} + + + + + + + true + Vista_$(DDKPlatform);7_$(DDKPlatform);Server2008_$(DDKPlatform);Server2008R2_$(DDKPlatform) + Vista_$(DDKPlatform);7_$(DDKPlatform);Server2008_$(DDKPlatform) + DbgengKernelDebugger + False + False + None + %PathToInf% + False + False + True + + 133563 + ..\$(ProjectName)\$(ConfigurationName)\$(Platform)\ + ..\$(ConfigurationName)\$(Platform)\ + ..\..\xenbus\$(DDKPlatform) + + + + + {d7411b2c-2c43-434d-9f56-e10a3d2f5bad} + + + {4bf41378-c01b-4002-8581-563c5f703362} + + + {14c16c29-77c9-475b-a618-1b01e67cf985} + + + {9c6a5d48-a331-4b1f-a004-7bb67ba5be1c} + + + + + + + + + + diff --git a/proj/targets.props b/proj/targets.props new file mode 100644 index 0000000..c8aba92 --- /dev/null +++ b/proj/targets.props @@ -0,0 +1,51 @@ + + + + Windows8 + true + + + Windows8 + false + + + Windows8 + true + + + Windows8 + false + + + Windows7 + true + + + Windows7 + false + + + Windows7 + true + + + Windows7 + false + + + Vista + true + + + Vista + false + + + Vista + true + + + Vista + false + + diff --git a/proj/xen/xen.vcxproj b/proj/xen/xen.vcxproj index 0c738ca..6a1ab27 100644 --- a/proj/xen/xen.vcxproj +++ b/proj/xen/xen.vcxproj @@ -1,206 +1,114 @@  - - - Windows Developer Preview Debug - Win32 - - - Windows Developer Preview Release - Win32 - - - Windows 7 Debug - Win32 - - - Windows 7 Release - Win32 - - - Windows Vista Debug - Win32 - - - Windows Vista Release - Win32 - - - Windows Developer Preview Debug - x64 - - - Windows Developer Preview Release - x64 - - - Windows 7 Debug - x64 - - - Windows 7 Release - x64 - - - Windows Vista Debug - x64 - - - Windows Vista Release - x64 - - - - {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C} - v4.5 - 11.0 - xen - - - WindowsKernelModeDriver8.0 - Driver - WDM - Windows Developer Preview Debug - - - - Windows8 - true - - - Windows8 - false - - - Windows7 - true - - - Windows7 - false - - - Vista - true - - - Vista - false - - - Windows8 - true - - - Windows8 - false - - - Windows7 - true - - - Windows7 - false - - - Vista - true - - - Vista - false - - - - - - - - DbgengKernelDebugger - - - $(IncludePath) - true - false - - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - __i386__;__MODULE__="XEN";POOL_NX_OPTIN=1;%(PreprocessorDefinitions) - EnableAllWarnings - 4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) - true - true - - - false - $(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;%(AdditionalDependencies) - ../../src/xen/xen.def - false - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - - - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - __x86_64__;__MODULE__="XEN";POOL_NX_OPTIN=1;%(PreprocessorDefinitions) - EnableAllWarnings - 4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) - true - true - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - - - $(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;%(AdditionalDependencies) - ../../src/xen/xen.def - false - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - true - - - true - - - - - - - - - + + + + Windows Vista Debug + Win32 + DbgengKernelDebugger + + + WDM + WindowsKernelModeDriver8.0 + Driver + WDM + + + + + + {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C} + + + + + + + ..\..\include;$(IncludePath) + true + false + ..\$(ProjectName)\$(ConfigurationName)\$(Platform)\ + ..\$(ConfigurationName)\$(Platform)\ + + + + + __MODULE__="XEN";POOL_NX_OPTIN=1;%(PreprocessorDefinitions) + EnableAllWarnings + 4711;4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) + true + true + + + false + $(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;%(AdditionalDependencies) + ../../src/xen/xen.def + false + + + true + true + $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION).$(BUILD_NUMBER) + true + + + + + __i386__;%(PreprocessorDefinitions) + + + x86 + + + + + __x86_64__;%(PreprocessorDefinitions) + + + amd64 + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + true + + + true + + + + + + + + + \ No newline at end of file diff --git a/proj/xenbus.sln b/proj/xenbus.sln index c87980e..d8e471d 100644 --- a/proj/xenbus.sln +++ b/proj/xenbus.sln @@ -28,10 +28,10 @@ Global Windows 7 Debug|x64 = Windows 7 Debug|x64 Windows 7 Release|Win32 = Windows 7 Release|Win32 Windows 7 Release|x64 = Windows 7 Release|x64 - Windows Developer Preview Debug|Win32 = Windows Developer Preview Debug|Win32 - Windows Developer Preview Debug|x64 = Windows Developer Preview Debug|x64 - Windows Developer Preview Release|Win32 = Windows Developer Preview Release|Win32 - Windows Developer Preview Release|x64 = Windows Developer Preview Release|x64 + Windows 8 Debug|Win32 = Windows 8 Debug|Win32 + Windows 8 Debug|x64 = Windows 8 Debug|x64 + Windows 8 Release|Win32 = Windows 8 Release|Win32 + Windows 8 Release|x64 = Windows 8 Release|x64 Windows Vista Debug|Win32 = Windows Vista Debug|Win32 Windows Vista Debug|x64 = Windows Vista Debug|x64 Windows Vista Release|Win32 = Windows Vista Release|Win32 @@ -46,14 +46,14 @@ Global {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 Release|Win32.Build.0 = Windows 7 Release|Win32 {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 Release|x64.ActiveCfg = Windows 7 Release|x64 {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 7 Release|x64.Build.0 = Windows 7 Release|x64 - {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Developer Preview Debug|Win32.ActiveCfg = Windows Developer Preview Debug|Win32 - {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Developer Preview Debug|Win32.Build.0 = Windows Developer Preview Debug|Win32 - {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Developer Preview Debug|x64.ActiveCfg = Windows Developer Preview Debug|x64 - {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Developer Preview Debug|x64.Build.0 = Windows Developer Preview Debug|x64 - {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Developer Preview Release|Win32.ActiveCfg = Windows Developer Preview Release|Win32 - {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Developer Preview Release|Win32.Build.0 = Windows Developer Preview Release|Win32 - {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Developer Preview Release|x64.ActiveCfg = Windows Developer Preview Release|x64 - {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Developer Preview Release|x64.Build.0 = Windows Developer Preview Release|x64 + {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32 + {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32 + {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64 + {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64 + {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32 + {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32 + {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64 + {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64 {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista Debug|Win32.ActiveCfg = Windows Vista Debug|Win32 {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista Debug|Win32.Build.0 = Windows Vista Debug|Win32 {14C16C29-77C9-475B-A618-1B01E67CF985}.Windows Vista Debug|x64.ActiveCfg = Windows Vista Debug|x64 @@ -70,14 +70,14 @@ Global {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 Release|Win32.Build.0 = Windows 7 Release|Win32 {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 Release|x64.ActiveCfg = Windows 7 Release|x64 {4BF41378-C01B-4002-8581-563C5F703362}.Windows 7 Release|x64.Build.0 = Windows 7 Release|x64 - {4BF41378-C01B-4002-8581-563C5F703362}.Windows Developer Preview Debug|Win32.ActiveCfg = Windows Developer Preview Debug|Win32 - {4BF41378-C01B-4002-8581-563C5F703362}.Windows Developer Preview Debug|Win32.Build.0 = Windows Developer Preview Debug|Win32 - {4BF41378-C01B-4002-8581-563C5F703362}.Windows Developer Preview Debug|x64.ActiveCfg = Windows Developer Preview Debug|x64 - {4BF41378-C01B-4002-8581-563C5F703362}.Windows Developer Preview Debug|x64.Build.0 = Windows Developer Preview Debug|x64 - {4BF41378-C01B-4002-8581-563C5F703362}.Windows Developer Preview Release|Win32.ActiveCfg = Windows Developer Preview Release|Win32 - {4BF41378-C01B-4002-8581-563C5F703362}.Windows Developer Preview Release|Win32.Build.0 = Windows Developer Preview Release|Win32 - {4BF41378-C01B-4002-8581-563C5F703362}.Windows Developer Preview Release|x64.ActiveCfg = Windows Developer Preview Release|x64 - {4BF41378-C01B-4002-8581-563C5F703362}.Windows Developer Preview Release|x64.Build.0 = Windows Developer Preview Release|x64 + {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32 + {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32 + {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64 + {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64 + {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32 + {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32 + {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64 + {4BF41378-C01B-4002-8581-563C5F703362}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64 {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista Debug|Win32.ActiveCfg = Windows Vista Debug|Win32 {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista Debug|Win32.Build.0 = Windows Vista Debug|Win32 {4BF41378-C01B-4002-8581-563C5F703362}.Windows Vista Debug|x64.ActiveCfg = Windows Vista Debug|x64 @@ -98,18 +98,18 @@ Global {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 Release|x64.ActiveCfg = Windows 7 Release|x64 {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 Release|x64.Build.0 = Windows 7 Release|x64 {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 7 Release|x64.Deploy.0 = Windows 7 Release|x64 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Debug|Win32.ActiveCfg = Windows Developer Preview Debug|Win32 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Debug|Win32.Build.0 = Windows Developer Preview Debug|Win32 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Debug|Win32.Deploy.0 = Windows Developer Preview Debug|Win32 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Debug|x64.ActiveCfg = Windows Developer Preview Debug|x64 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Debug|x64.Build.0 = Windows Developer Preview Debug|x64 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Debug|x64.Deploy.0 = Windows Developer Preview Debug|x64 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Release|Win32.ActiveCfg = Windows Developer Preview Release|Win32 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Release|Win32.Build.0 = Windows Developer Preview Release|Win32 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Release|Win32.Deploy.0 = Windows Developer Preview Release|Win32 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Release|x64.ActiveCfg = Windows Developer Preview Release|x64 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Release|x64.Build.0 = Windows Developer Preview Release|x64 - {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Developer Preview Release|x64.Deploy.0 = Windows Developer Preview Release|x64 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Debug|Win32.Deploy.0 = Windows 8 Debug|Win32 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Debug|x64.Deploy.0 = Windows 8 Debug|x64 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Release|Win32.Deploy.0 = Windows 8 Release|Win32 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64 + {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows 8 Release|x64.Deploy.0 = Windows 8 Release|x64 {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista Debug|Win32.ActiveCfg = Windows Vista Debug|Win32 {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista Debug|Win32.Build.0 = Windows Vista Debug|Win32 {92E5A46B-913C-45C6-B6F8-7E062D85279F}.Windows Vista Debug|Win32.Deploy.0 = Windows Vista Debug|Win32 @@ -130,14 +130,14 @@ Global {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 7 Release|Win32.Build.0 = Windows 7 Release|Win32 {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 7 Release|x64.ActiveCfg = Windows 7 Release|x64 {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 7 Release|x64.Build.0 = Windows 7 Release|x64 - {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Developer Preview Debug|Win32.ActiveCfg = Windows Developer Preview Debug|Win32 - {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Developer Preview Debug|Win32.Build.0 = Windows Developer Preview Debug|Win32 - {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Developer Preview Debug|x64.ActiveCfg = Windows Developer Preview Debug|x64 - {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Developer Preview Debug|x64.Build.0 = Windows Developer Preview Debug|x64 - {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Developer Preview Release|Win32.ActiveCfg = Windows Developer Preview Release|Win32 - {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Developer Preview Release|Win32.Build.0 = Windows Developer Preview Release|Win32 - {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Developer Preview Release|x64.ActiveCfg = Windows Developer Preview Release|x64 - {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Developer Preview Release|x64.Build.0 = Windows Developer Preview Release|x64 + {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32 + {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32 + {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64 + {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64 + {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32 + {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32 + {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64 + {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64 {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Vista Debug|Win32.ActiveCfg = Windows Vista Debug|Win32 {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Vista Debug|Win32.Build.0 = Windows Vista Debug|Win32 {9C6A5D48-A331-4B1F-A004-7BB67BA5BE1C}.Windows Vista Debug|x64.ActiveCfg = Windows Vista Debug|x64 @@ -154,14 +154,14 @@ Global {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 7 Release|Win32.Build.0 = Windows 7 Release|Win32 {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 7 Release|x64.ActiveCfg = Windows 7 Release|x64 {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 7 Release|x64.Build.0 = Windows 7 Release|x64 - {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Developer Preview Debug|Win32.ActiveCfg = Windows Developer Preview Debug|Win32 - {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Developer Preview Debug|Win32.Build.0 = Windows Developer Preview Debug|Win32 - {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Developer Preview Debug|x64.ActiveCfg = Windows Developer Preview Debug|x64 - {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Developer Preview Debug|x64.Build.0 = Windows Developer Preview Debug|x64 - {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Developer Preview Release|Win32.ActiveCfg = Windows Developer Preview Release|Win32 - {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Developer Preview Release|Win32.Build.0 = Windows Developer Preview Release|Win32 - {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Developer Preview Release|x64.ActiveCfg = Windows Developer Preview Release|x64 - {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Developer Preview Release|x64.Build.0 = Windows Developer Preview Release|x64 + {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 8 Debug|Win32.ActiveCfg = Windows 8 Debug|Win32 + {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 8 Debug|Win32.Build.0 = Windows 8 Debug|Win32 + {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 8 Debug|x64.ActiveCfg = Windows 8 Debug|x64 + {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 8 Debug|x64.Build.0 = Windows 8 Debug|x64 + {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 8 Release|Win32.ActiveCfg = Windows 8 Release|Win32 + {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 8 Release|Win32.Build.0 = Windows 8 Release|Win32 + {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 8 Release|x64.ActiveCfg = Windows 8 Release|x64 + {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows 8 Release|x64.Build.0 = Windows 8 Release|x64 {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Vista Debug|Win32.ActiveCfg = Windows Vista Debug|Win32 {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Vista Debug|Win32.Build.0 = Windows Vista Debug|Win32 {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD}.Windows Vista Debug|x64.ActiveCfg = Windows Vista Debug|x64 diff --git a/proj/xenbus/xenbus.vcxproj b/proj/xenbus/xenbus.vcxproj index ee0dd89..d740b04 100644 --- a/proj/xenbus/xenbus.vcxproj +++ b/proj/xenbus/xenbus.vcxproj @@ -1,203 +1,101 @@ - - - Windows Developer Preview Debug - Win32 - - - Windows Developer Preview Release - Win32 - - - Windows 7 Debug - Win32 - - - Windows 7 Release - Win32 - - - Windows Vista Debug - Win32 - - - Windows Vista Release - Win32 - - - Windows Developer Preview Debug - x64 - - - Windows Developer Preview Release - x64 - - - Windows 7 Debug - x64 - - - Windows 7 Release - x64 - - - Windows Vista Debug - x64 - - - Windows Vista Release - x64 - - - - {14C16C29-77C9-475B-A618-1B01E67CF985} - v4.5 - 11.0 - xenbus - - - WindowsKernelModeDriver8.0 - Driver - WDM - Windows Developer Preview Debug - - - - Windows8 - true - - - Windows8 - false - - - Windows7 - true - - - Windows7 - false - - - Vista - true - - - Vista - false - - - Windows8 - true - - - Windows8 - false - - - Windows7 - true - - - Windows7 - false - - - Vista - true - - - Vista - false - - - - - - - - $(IncludePath) - true - false - - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - __i386__;__MODULE__="XENBUS";POOL_NX_OPTIN=1;%(PreprocessorDefinitions) - EnableAllWarnings - 4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) - true - true - - - false - $(SolutionDir)$(ConfigurationName)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies) - false - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - - - true - x86 - true - $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION).$(BUILD_NUMBER) - true - - - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - __x86_64__;__MODULE__="XENBUS";POOL_NX_OPTIN=1;%(PreprocessorDefinitions) - EnableAllWarnings - 4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) - true - true - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - - - $(SolutionDir)$(Platform)\$(ConfigurationName)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies) - false - - - true - amd64 - true - $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION).$(BUILD_NUMBER) - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Windows Vista Debug + Win32 + DbgengKernelDebugger + + + WDM + WindowsKernelModeDriver8.0 + Driver + WDM + + + + + + {14C16C29-77C9-475B-A618-1B01E67CF985} + + + + + + + ..\..\include;$(IncludePath) + true + false + ..\$(ProjectName)\$(ConfigurationName)\$(Platform)\ + ..\$(ConfigurationName)\$(Platform)\ + + + + + __MODULE__="XENBUS";POOL_NX_OPTIN=1;%(PreprocessorDefinitions) + EnableAllWarnings + 4711;4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) + true + true + + + false + $(ProjectDir)..\$(ConfigurationName)\$(Platform)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies) + false + + + true + true + $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION).$(BUILD_NUMBER) + true + + + + + __i386__;%(PreprocessorDefinitions) + + + x86 + + + + + __x86_64__;%(PreprocessorDefinitions) + + + amd64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/proj/xenbus_coinst/xenbus_coinst.vcxproj b/proj/xenbus_coinst/xenbus_coinst.vcxproj index c9aba6d..4321abe 100644 --- a/proj/xenbus_coinst/xenbus_coinst.vcxproj +++ b/proj/xenbus_coinst/xenbus_coinst.vcxproj @@ -1,177 +1,74 @@ - - - Windows Developer Preview Debug - Win32 - - - Windows Developer Preview Release - Win32 - - - Windows 7 Debug - Win32 - - - Windows 7 Release - Win32 - - - Windows Vista Debug - Win32 - - - Windows Vista Release - Win32 - - - Windows Developer Preview Debug - x64 - - - Windows Developer Preview Release - x64 - - - Windows 7 Debug - x64 - - - Windows 7 Release - x64 - - - Windows Vista Debug - x64 - - - Windows Vista Release - x64 - - - - {4BF41378-C01B-4002-8581-563C5F703362} - v4.5 - 11.0 - xenbus_coinst - - - WindowsApplicationForDrivers8.0 - DynamicLibrary - WDM - Windows Developer Preview Debug - - - - Windows8 - true - - - Windows8 - false - - - Windows7 - true - - - Windows7 - false - - - Vista - true - - - Vista - false - - - Windows8 - true - - - Windows8 - false - - - Windows7 - true - - - Windows7 - false - - - Vista - true - - - Vista - false - - - - - - - - DbgengKernelDebugger - - - $(IncludePath) - true - false - - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - __i386__;__MODULE__="XENBUS_COINST";%(PreprocessorDefinitions) - EnableAllWarnings - 4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) - true - true - MultiThreadedDebug - MultiThreaded - - - ../../src/coinst/xenbus_coinst.def - setupapi.lib;%(AdditionalDependencies) - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - - - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - __x86_64__;__MODULE__="XENBUS_COINST";%(PreprocessorDefinitions) - EnableAllWarnings - 4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) - true - true - MultiThreadedDebug - MultiThreaded - - - ../../src/coinst/xenbus_coinst.def - setupapi.lib;%(AdditionalDependencies) - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - - - - - - - - - - - - - - + + + + WDM + WindowsApplicationForDrivers8.0 + DynamicLibrary + WDM + + + Windows Vista Debug + Win32 + DbgengKernelDebugger + + + + + + {4BF41378-C01B-4002-8581-563C5F703362} + + + + + + + $(IncludePath) + true + false + + + + + $(SolutionDir)..\include;%(AdditionalIncludeDirectories) + __MODULE__="XENBUS_COINST";%(PreprocessorDefinitions) + EnableAllWarnings + 4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) + true + true + MultiThreadedDebug + MultiThreaded + + + ../../src/coinst/xenbus_coinst.def + setupapi.lib;%(AdditionalDependencies) + + + $(SolutionDir)..\include;%(AdditionalIncludeDirectories) + + + + + __i386__;%(PreprocessorDefinitions) + + + + + __x86_64__;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/proj/xenfilt/xenfilt.vcxproj b/proj/xenfilt/xenfilt.vcxproj index e19c4a7..5ca6b24 100644 --- a/proj/xenfilt/xenfilt.vcxproj +++ b/proj/xenfilt/xenfilt.vcxproj @@ -1,179 +1,88 @@ - - - Windows Developer Preview Debug - Win32 - - - Windows Developer Preview Release - Win32 - - - Windows 7 Debug - Win32 - - - Windows 7 Release - Win32 - - - Windows Vista Debug - Win32 - - - Windows Vista Release - Win32 - - - Windows Developer Preview Debug - x64 - - - Windows Developer Preview Release - x64 - - - Windows 7 Debug - x64 - - - Windows 7 Release - x64 - - - Windows Vista Debug - x64 - - - Windows Vista Release - x64 - - - - {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD} - v4.5 - 11.0 - xenfilt - - - WindowsKernelModeDriver8.0 - Driver - WDM - Windows Developer Preview Debug - - - - Windows8 - true - - - Windows8 - false - - - Windows7 - true - - - Windows7 - false - - - Vista - true - - - Vista - false - - - Windows8 - true - - - Windows8 - false - - - Windows7 - true - - - Windows7 - false - - - Vista - true - - - Vista - false - - - - - - - - DbgengKernelDebugger - - - $(IncludePath) - true - false - - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - __i386__;__MODULE__="XENFILT";POOL_NX_OPTIN=1;%(PreprocessorDefinitions) - EnableAllWarnings - 4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) - true - true - - - false - $(SolutionDir)$(ConfigurationName)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies) - false - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - - - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - __x86_64__;__MODULE__="XENFILT";POOL_NX_OPTIN=1;%(PreprocessorDefinitions) - EnableAllWarnings - 4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) - true - true - - - $(SolutionDir)..\include;%(AdditionalIncludeDirectories) - - - $(SolutionDir)$(Platform)\$(ConfigurationName)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies) - false - - - - - - - - - - - - - - - - - - - + + + + Windows Vista Debug + Win32 + DbgengKernelDebugger + + + WDM + WindowsKernelModeDriver8.0 + Driver + WDM + + + + + + {D7411B2C-2C43-434D-9F56-E10A3D2F5BAD} + + + + + + + ..\..\include;$(IncludePath) + true + false + ..\$(ProjectName)\$(ConfigurationName)\$(Platform)\ + ..\$(ConfigurationName)\$(Platform)\ + + + + + __MODULE__="XENFILT";POOL_NX_OPTIN=1;%(PreprocessorDefinitions) + EnableAllWarnings + 4711;4548;4820;4668;4255;6001;6054;28196;%(DisableSpecificWarnings) + true + true + + + false + $(ProjectDir)..\$(ConfigurationName)\$(Platform)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies) + false + + + true + true + $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION).$(BUILD_NUMBER) + true + + + + + __i386__;%(PreprocessorDefinitions) + + + x86 + + + + + __x86_64__;%(PreprocessorDefinitions) + + + amd64 + + + + + + + + + + + + + + + + + + + + diff --git a/sdv.py b/sdv.py index f75c483..16861e7 100644 --- a/sdv.py +++ b/sdv.py @@ -18,32 +18,49 @@ def shell(command): return pipe.close() - class msbuild_failure(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) -def msbuild(batfile, projdir, name, sdv_arg): +def msbuild(name, target, sdv_arg): cwd = os.getcwd() - os.environ['CONFIGURATION'] = 'Windows Developer Preview Release' - os.environ['SDV_PROJ'] = name - os.environ['SDV_ARG'] = sdv_arg + os.environ['CONFIGURATION'] = 'Windows 8 Release' + os.environ['PLATFORM'] = 'x64' + os.environ['TARGET'] = target + os.environ['BUILD_FILE'] = name + '.vcxproj' + os.environ['BUILD_ARGS'] = sdv_arg os.chdir('proj') - os.chdir(projdir) - status = shell(batfile) + os.chdir(name) + status = shell('..\\msbuild.bat') os.chdir(cwd) # if (status != None): # raise msbuild_failure(sdv_arg) +def archive(filename, files, tgz=False): + access='w' + if tgz: + access='w:gz' + tar = tarfile.open(filename, access) + for name in files : + try: + print('adding '+name) + tar.add(name) + except: + pass + tar.close() if __name__ == '__main__': - msbuild('..\msbuild_sdv.bat', 'xenbus', 'xenbus.vcxproj', '/clean') - - msbuild('..\msbuild_sdv.bat', 'xenbus', 'xenbus.vcxproj', '/check:default.sdv') - - msbuild('..\msbuild_dvl.bat', 'xenbus', 'xenbus.vcxproj', '') + msbuild('xen', 'sdv', '/p:Inputs="/clean"') + msbuild('xenfilt', 'sdv', '/p:Inputs="/clean"') + msbuild('xenbus', 'sdv', '/p:Inputs="/clean"') + msbuild('xen', 'sdv', '/p:Inputs="/check:default.sdv"') + msbuild('xenfilt', 'sdv', '/p:Inputs="/check:default.sdv"') + msbuild('xenbus', 'sdv', '/p:Inputs="/check:default.sdv"') + msbuild('xen', 'dvl', '') + msbuild('xenfilt', 'dvl', '') + msbuild('xenbus', 'dvl', '') diff --git a/src/xen/debug.c b/src/xen/debug.c index 92f66a7..c0f073f 100644 --- a/src/xen/debug.c +++ b/src/xen/debug.c @@ -51,6 +51,10 @@ DebugTeardown( (VOID) KeDeregisterBugCheckCallback(&DebugBugCheckCallbackRecord); } +#pragma warning(push) +#pragma warning(disable: 6320) // Exception-filter expression is the constant EXCEPTION_EXECUTE_HANDLER. This might mask exceptions that were not intended to be handled. +#pragma warning(disable: 6322) // Empty _except block. + static DECLSPEC_NOINLINE VOID DebugDumpExceptionRecord( IN PEXCEPTION_RECORD Exception @@ -879,6 +883,8 @@ DebugDefaultHandler( } } +#pragma warning(pop) + KBUGCHECK_CALLBACK_ROUTINE DebugBugCheckCallback; VOID diff --git a/src/xen/dump.c b/src/xen/dump.c index df3dcb7..1bc8099 100644 --- a/src/xen/dump.c +++ b/src/xen/dump.c @@ -42,7 +42,7 @@ // To enable you need to customize /opt/xensource/libexec/qemu-dm-wrapper in dom0 to add the following // arguments to the qemu command line: // -// -priv -dumpdir -dumpquota +// -dumpdir -dumpquota // // is best pointed at an empty directory. Files will be created with numeric names starting at 0. // should be the total size in MB of all possible crash dump files. I.e. once sufficient crash dumps have @@ -159,7 +159,7 @@ DumpBugCheckReasonCallback( PKBUGCHECK_DUMP_IO DumpIo = (PKBUGCHECK_DUMP_IO)ReasonSpecificData; UNREFERENCED_PARAMETER(ReasonSpecificDataLength); - + ASSERT3U(Reason, ==, KbCallbackDumpIo); ASSERT3P(Record, ==, &DumpBugCheckReasonCallbackRecord); ASSERT(DumpIo != NULL); diff --git a/src/xen/log.c b/src/xen/log.c index 2c3e2d4..a1a116a 100644 --- a/src/xen/log.c +++ b/src/xen/log.c @@ -178,10 +178,10 @@ LogCchVPrintf( ASSERT(Character != '\0'); } - if (isdigit(Character)) { + if (isdigit((unsigned char)Character)) { ZeroPrefix = (Character == '0') ? TRUE : FALSE; - while (isdigit(Character)) { + while (isdigit((unsigned char)Character)) { Pad = (Pad * 10) + (Character - '0'); Character = *Format++; ASSERT(Character != '\0'); diff --git a/src/xen/log.h b/src/xen/log.h index 0936607..3a2d80b 100644 --- a/src/xen/log.h +++ b/src/xen/log.h @@ -32,6 +32,8 @@ #ifndef _XEN_LOG_H #define _XEN_LOG_H +#define __MODULE__ "XEN" + #include #include diff --git a/src/xenbus.inf b/src/xenbus.inf index 210a35a..107f22f 100644 --- a/src/xenbus.inf +++ b/src/xenbus.inf @@ -1,6 +1,32 @@ -; Copyright 2011 Citrix Systems Inc. All rights reserved. -; Use is subject to license terms. -; +; Copyright (c) Citrix Systems Inc. +; All rights reserved. +; +; Redistribution and use in source and binary forms, +; with or without modification, are permitted provided +; that the following conditions are met: +; +; * Redistributions of source code must retain the above +; copyright notice, this list of conditions and the +; following disclaimer. +; * Redistributions in binary form must reproduce the above +; copyright notice, this list of conditions and the +; following disclaimer in the documentation and/or other +; materials provided with the distribution. +; +; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +; CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +; INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +; MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +; BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +; SUCH DAMAGE. [Version] Signature="$Windows NT$" diff --git a/src/xenbus/balloon.c b/src/xenbus/balloon.c index 9fa7512..3b2d817 100644 --- a/src/xenbus/balloon.c +++ b/src/xenbus/balloon.c @@ -506,10 +506,12 @@ __BalloonReleasePfnArray( status = RangeSetPut(Balloon->RangeSet, (ULONGLONG)Balloon->PfnArray[Index], (ULONGLONG)Balloon->PfnArray[Next]); - ASSERT(NT_SUCCESS(status)); + if (!NT_SUCCESS(status)) + break; Index = Next + 1; } + Requested = Index; Count = __BalloonDecreaseReservation(Requested, Balloon->PfnArray); @@ -627,7 +629,7 @@ BalloonDeflate( Count = 0; Abort = FALSE; - while (Count < Requested) { + while (Count < Requested && !Abort) { ULONG ThisTime = (ULONG)__min(Requested - Count, BALLOON_PFN_ARRAY_SIZE); ULONG Populated; ULONG Freed; diff --git a/src/xenbus/dma.c b/src/xenbus/dma.c index 85fcbd6..ffbc801 100644 --- a/src/xenbus/dma.c +++ b/src/xenbus/dma.c @@ -286,6 +286,7 @@ static PXENBUS_DMA_CONTEXT DmaContext[NR_CONTEXT_BUCKETS]; #define DMA_CONTEXT_BUCKET(_Key) \ (((ULONG_PTR)(_Key) >> 8) % NR_CONTEXT_BUCKETS) +#pragma warning(suppress: 28167) // changes the IRQL and does not restore the IRQL before it exits static FORCEINLINE KIRQL __DmaAcquireLock( IN PKSPIN_LOCK Lock @@ -301,6 +302,7 @@ __DmaAcquireLock( return Irql; } +#pragma warning(suppress: 28167) // changes the IRQL and does not restore the IRQL before it exits static FORCEINLINE VOID __DmaReleaseLock( IN PKSPIN_LOCK Lock, @@ -336,11 +338,14 @@ __DmaRemoveContext( IN PXENBUS_DMA_CONTEXT Context ) { - PVOID Key = Context->Key; + PVOID Key; KIRQL Irql; ULONG_PTR Bucket; PXENBUS_DMA_CONTEXT *Entry; + ASSERT(Context != NULL); + Key = Context->Key; + Irql = __DmaAcquireLock(&DmaContextLock); Bucket = DMA_CONTEXT_BUCKET(Key); Entry = &DmaContext[Bucket]; diff --git a/src/xenbus/evtchn.c b/src/xenbus/evtchn.c index 5a7ed2e..7dda022 100644 --- a/src/xenbus/evtchn.c +++ b/src/xenbus/evtchn.c @@ -114,6 +114,34 @@ __EvtchnFree( __FreePoolWithTag(Buffer, EVTCHN_TAG); } +#pragma warning(push) +#pragma warning(disable: 28230) +#pragma warning(disable: 28285) + +_IRQL_requires_max_(HIGH_LEVEL) // HIGH_LEVEL is best approximation of DIRQL +_IRQL_saves_ +_IRQL_raises_(HIGH_LEVEL) // HIGH_LEVEL is best approximation of DIRQL +static FORCEINLINE KIRQL +__AcquireInterruptLock( + _Inout_ PKINTERRUPT Interrupt + ) +{ + return KeAcquireInterruptSpinLock(Interrupt); +} + +_IRQL_requires_(HIGH_LEVEL) // HIGH_LEVEL is best approximation of DIRQL +static FORCEINLINE VOID +__ReleaseInterruptLock( + _Inout_ PKINTERRUPT Interrupt, + _In_ _IRQL_restores_ KIRQL Irql + ) +{ +#pragma prefast(suppress:28121) // The function is not permitted to be called at the current IRQ level + KeReleaseInterruptSpinLock(Interrupt, Irql); +} + +#pragma warning(pop) + static FORCEINLINE NTSTATUS __EvtchnOpenFixed( IN PXENBUS_EVTCHN_DESCRIPTOR Descriptor, @@ -292,7 +320,7 @@ EvtchnOpen( LocalPort = Descriptor->LocalPort; - (VOID) KeAcquireInterruptSpinLock(Context->InterruptObject); + (VOID) __AcquireInterruptLock(Context->InterruptObject); ASSERT3P(Context->Descriptor[LocalPort], ==, NULL); Context->Descriptor[LocalPort] = Descriptor; @@ -300,8 +328,7 @@ EvtchnOpen( InsertTailList(&Context->List, &Descriptor->ListEntry); -#pragma prefast(suppress:28121) // The function is not permitted to be called at the current IRQ level - KeReleaseInterruptSpinLock(Context->InterruptObject, DISPATCH_LEVEL); + __ReleaseInterruptLock(Context->InterruptObject, DISPATCH_LEVEL); KeLowerIrql(Irql); @@ -341,7 +368,7 @@ EvtchnUnmask( BOOLEAN Pending; if (!Locked) - Irql = KeAcquireInterruptSpinLock(Context->InterruptObject); + Irql = __AcquireInterruptLock(Context->InterruptObject); if (Descriptor->Active) { Pending = SHARED_INFO(EvtchnUnmask, @@ -382,7 +409,7 @@ EvtchnUnmask( if (!Locked) #pragma prefast(suppress:28121) // The function is not permitted to be called at the current IRQ level - KeReleaseInterruptSpinLock(Context->InterruptObject, Irql); + __ReleaseInterruptLock(Context->InterruptObject, Irql); return Pending; } @@ -443,7 +470,7 @@ EvtchnTrigger( KIRQL Irql; BOOLEAN DoneSomething; - Irql = KeAcquireInterruptSpinLock(Context->InterruptObject); + Irql = __AcquireInterruptLock(Context->InterruptObject); if (Descriptor->Active) { DoneSomething = __EvtchnCallback(Context, Descriptor); @@ -453,7 +480,7 @@ EvtchnTrigger( } #pragma prefast(suppress:28121) // The function is not permitted to be called at the current IRQ level - KeReleaseInterruptSpinLock(Context->InterruptObject, Irql); + __ReleaseInterruptLock(Context->InterruptObject, Irql); return DoneSomething; } @@ -466,7 +493,7 @@ EvtchnClose( { KIRQL Irql; - Irql = KeAcquireInterruptSpinLock(Context->InterruptObject); + Irql = __AcquireInterruptLock(Context->InterruptObject); RemoveEntryList(&Descriptor->ListEntry); RtlZeroMemory(&Descriptor->ListEntry, sizeof (LIST_ENTRY)); @@ -488,7 +515,7 @@ EvtchnClose( } #pragma prefast(suppress:28121) // The function is not permitted to be called at the current IRQ level - KeReleaseInterruptSpinLock(Context->InterruptObject, Irql); + __ReleaseInterruptLock(Context->InterruptObject, Irql); Descriptor->LocalPort = 0; RtlZeroMemory(&Descriptor->Parameters, sizeof (EVTCHN_PARAMETERS)); diff --git a/src/xenbus/fdo.c b/src/xenbus/fdo.c index 50a3256..f6ae1f1 100644 --- a/src/xenbus/fdo.c +++ b/src/xenbus/fdo.c @@ -118,6 +118,34 @@ __FdoFree( __FreePoolWithTag(Buffer, FDO_TAG); } +#pragma warning(push) +#pragma warning(disable: 28230) +#pragma warning(disable: 28285) + +_IRQL_requires_max_(HIGH_LEVEL) // HIGH_LEVEL is best approximation of DIRQL +_IRQL_saves_ +_IRQL_raises_(HIGH_LEVEL) // HIGH_LEVEL is best approximation of DIRQL +static FORCEINLINE KIRQL +__AcquireInterruptLock( + _Inout_ PKINTERRUPT Interrupt + ) +{ + return KeAcquireInterruptSpinLock(Interrupt); +} + +_IRQL_requires_(HIGH_LEVEL) // HIGH_LEVEL is best approximation of DIRQL +static FORCEINLINE VOID +__ReleaseInterruptLock( + _Inout_ PKINTERRUPT Interrupt, + _In_ _IRQL_restores_ KIRQL Irql + ) +{ +#pragma prefast(suppress:28121) // The function is not permitted to be called at the current IRQ level + KeReleaseInterruptSpinLock(Interrupt, Irql); +} + +#pragma warning(pop) + static FORCEINLINE VOID __FdoSetDevicePnpState( IN PXENBUS_FDO Fdo, @@ -947,6 +975,7 @@ FdoBalloon( PXENBUS_FDO Fdo = Context; PKEVENT Event; BOOLEAN Active; + static ULONGLONG Maximum; // Should never change in the lifetime of the VM NTSTATUS status; Trace("====>\n"); @@ -957,7 +986,6 @@ FdoBalloon( for (;;) { PCHAR Buffer; - ULONGLONG Maximum; ULONGLONG Target; BOOLEAN AllowInflation; BOOLEAN AllowDeflation; @@ -983,19 +1011,21 @@ FdoBalloon( if (__FdoGetDevicePowerState(Fdo) != PowerDeviceD0) goto loop; - status = STORE(Read, - &Fdo->StoreInterface, - NULL, - "memory", - "static-max", - &Buffer); - if (!NT_SUCCESS(status)) - goto loop; - - Maximum = _strtoui64(Buffer, NULL, 10) / 4; - STORE(Free, - &Fdo->StoreInterface, - Buffer); + if (Maximum == 0) { + status = STORE(Read, + &Fdo->StoreInterface, + NULL, + "memory", + "static-max", + &Buffer); + if (!NT_SUCCESS(status)) + goto loop; + + Maximum = _strtoui64(Buffer, NULL, 10) / 4; + STORE(Free, + &Fdo->StoreInterface, + Buffer); + } status = STORE(Read, &Fdo->StoreInterface, @@ -1314,11 +1344,10 @@ __FdoEnableInterrupt( InterruptObject = __FdoGetInterruptObject(Fdo); - Irql = KeAcquireInterruptSpinLock(InterruptObject); + Irql = __AcquireInterruptLock(InterruptObject); Fdo->InterruptEnabled = TRUE; -#pragma prefast(suppress:28121) // The function is not permitted to be called at the current IRQ level - KeReleaseInterruptSpinLock(InterruptObject, Irql); + __ReleaseInterruptLock(InterruptObject, Irql); } static FORCEINLINE VOID @@ -1331,11 +1360,10 @@ __FdoDisableInterrupt( InterruptObject = __FdoGetInterruptObject(Fdo); - Irql = KeAcquireInterruptSpinLock(InterruptObject); + Irql = __AcquireInterruptLock(InterruptObject); Fdo->InterruptEnabled = FALSE; -#pragma prefast(suppress:28121) // The function is not permitted to be called at the current IRQ level - KeReleaseInterruptSpinLock(InterruptObject, Irql); + __ReleaseInterruptLock(InterruptObject, Irql); } PXENBUS_DEBUG_INTERFACE diff --git a/src/xenbus/log.h b/src/xenbus/log.h index f15e5b8..8799ce7 100644 --- a/src/xenbus/log.h +++ b/src/xenbus/log.h @@ -32,6 +32,8 @@ #ifndef _XENBUS_LOG_H #define _XENBUS_LOG_H +#define __MODULE__ "XENBUS" + #include #include diff --git a/src/xenfilt/fdo.c b/src/xenfilt/fdo.c index 6dbb3e1..6507f2f 100644 --- a/src/xenfilt/fdo.c +++ b/src/xenfilt/fdo.c @@ -314,6 +314,7 @@ __FdoEnumerate( // Walk the list and create PDO filters for any new devices for (Index = 0; Index < Count; Index++) { +#pragma warning(suppress:6385) // Reading invalid data from 'PhysicalDeviceObject' if (PhysicalDeviceObject[Index] != NULL) { (VOID) PdoCreate(Fdo, PhysicalDeviceObject[Index]); ObDereferenceObject(PhysicalDeviceObject[Index]); diff --git a/src/xenfilt/log.h b/src/xenfilt/log.h index e6e65c1..69e1819 100644 --- a/src/xenfilt/log.h +++ b/src/xenfilt/log.h @@ -32,6 +32,8 @@ #ifndef _XENFILT_LOG_H #define _XENFILT_LOG_H +#define __MODULE__ "XENFILT" + #include #include