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

[PATCH 1/3] Fix build with later WDKs


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Thu, 12 Aug 2021 13:39:05 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Thu, 12 Aug 2021 12:39:16 +0000
  • Ironport-hdrordr: A9a23:EKHyq6x3cu8Ww+MRB7RaKrPxl+skLtp133Aq2lEZdPUMSL3gqy nPpoVY6ff14AxxZJhSo6HGBEDgewKbyXcb2/h1AV7PZmbbUS6TXedfBOjZsnTd8k/Fh4pgPM 5bGsAUZbHN5BpB/KHHCWKDc+rIteP3kpxA8t2urEuFIzsFV0nMhD0SNi+rVmlNACVWD5swE5 SRouBdoSC7RHgRZsOnQlEYQunqvbTw5dnbSC9DIyRixBiFjDuu5rK/OQOfxA0iXzRGxqpn2X TZkjb++r6ov5iAu1XhPi7ontlrcenau5R+7f+3+4Yow/LX+0eVjbFaKvG/VfYO0aGSARgR4Z rxSlwbTrxOAjvqDxqISZyH4Xil7N77gEWSjGNwx0GT6fDRVXY0DdFMipledQac4008vMtk2K YOxG6BsYFLZCmw6RgVyuK4JC2CrHDE00bKUNRj8EB3QM8bcvtcvIYf9ERaHNMJGz/78pkuFK 1rANvH7PhbfFuGZzSB11Mft+CETzA2BFOLU0ICssua33xfm2141VIRwIgakm0b/JwwRpFY76 DPM7hulrtJUsgKBJgNcNspUI+yECjAUBjMOGWdLRDuE7wGIWvEr9rt7LA89IiRCew1JVsJ6e X8uXZjxBgPkm7VeLCzNaxwg27wqT+GLE7QI+llluREhoE=
  • Ironport-sdr: fOaHKb6Js87eg+IRhXlpDxpUdDbLnUdZqBdczjZ43g3wFHEBNh74dI558BsE1bMfypMUw010SQ 77LjBZrmfUdr0A3UHHX2X29br0xAqGbWUFsILr78lBfb/jOrhgOks8rc46s9ptfnanSgaixlOb HV5kgq2PHnB6vhTo9I3K73QTsRB6G0j4g6/9daNgI3f3kUnlu2ChYEuZ0uMjtX68bqN7tfhWMv deS3jYkYSsdtIPSZBQeWcRkWq8CcMkr8zqHqDWNfpnK8NWsXrBAC7RfW4/BCQcT29GjBGYHstK /LWifKDtIeGVW97+kmiy5MO+
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

- Adds alias for GetProjectInfoForReference target to version.vcxproj
    Later kits seemed to have renamed the build target, and will fail without
    this alias target.
- Adds "/fd sha256" to signtool command line
    WDK 20344 and later require binaries signed with a SHA256 file digest, or
    the build outputs are deleted
- Fixes warning 4061 - switch statement on enum types need to have a case for
    all values of the enumeration

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xennet/adapter.c                       |  8 ++++++++
 src/xennet/miniport.c                      | 10 ++++++++++
 src/xennet/receiver.c                      |  3 +++
 vs2019/package/package.vcxproj             |  5 +++++
 vs2019/version/version.vcxproj             |  6 ++++++
 vs2019/xennet/xennet.vcxproj               |  3 +++
 vs2019/xennet_coinst/xennet_coinst.vcxproj |  3 +++
 7 files changed, 38 insertions(+)

diff --git a/src/xennet/adapter.c b/src/xennet/adapter.c
index eaa2c1b..8b419bf 100644
--- a/src/xennet/adapter.c
+++ b/src/xennet/adapter.c
@@ -2097,6 +2097,10 @@ AdapterSetInformation(
                 Info("%ws: SET_POWER: D3\n",
                      Adapter->Location);
                 break;
+
+            case NdisDeviceStateUnspecified:
+            case NdisDeviceStateMaximum:
+                break;
             }
         }
         // do nothing
@@ -2313,6 +2317,10 @@ AdapterQueryInformation(
                 Info("%ws: QUERY_POWER: D3\n",
                      Adapter->Location);
                 break;
+
+            case NdisDeviceStateUnspecified:
+            case NdisDeviceStateMaximum:
+                break;
             }
         }
 
diff --git a/src/xennet/miniport.c b/src/xennet/miniport.c
index 5b69315..0398d80 100644
--- a/src/xennet/miniport.c
+++ b/src/xennet/miniport.c
@@ -165,6 +165,16 @@ MiniportOidRequest(
             NdisStatus = AdapterQueryInformation(Adapter, OidRequest);
             break;
 
+        case NdisRequestOpen:
+        case NdisRequestClose:
+        case NdisRequestSend:
+        case NdisRequestTransferData:
+        case NdisRequestReset:
+        case NdisRequestGeneric1:
+        case NdisRequestGeneric2:
+        case NdisRequestGeneric3:
+        case NdisRequestGeneric4:
+        case NdisRequestMethod:
         default:
             NdisStatus = NDIS_STATUS_NOT_SUPPORTED;
             break;
diff --git a/src/xennet/receiver.c b/src/xennet/receiver.c
index 2f7ea25..ff9a7c5 100644
--- a/src/xennet/receiver.c
+++ b/src/xennet/receiver.c
@@ -284,6 +284,8 @@ __ReceiverReceivePacket(
                                           NdisHashFunctionToeplitz);
         break;
 
+    case XENVIF_PACKET_HASH_ALGORITHM_NONE:
+    case XENVIF_PACKET_HASH_ALGORITHM_UNSPECIFIED:
     default:
         goto done;
     }
@@ -309,6 +311,7 @@ __ReceiverReceivePacket(
                                       NDIS_HASH_TCP_IPV6);
         break;
 
+    case XENVIF_PACKET_HASH_TYPE_NONE:
     default:
         ASSERT(FALSE);
         break;
diff --git a/vs2019/package/package.vcxproj b/vs2019/package/package.vcxproj
index dd794b5..1a439ee 100644
--- a/vs2019/package/package.vcxproj
+++ b/vs2019/package/package.vcxproj
@@ -31,6 +31,11 @@
     <IntDir>..\$(ProjectName)\$(ConfigurationName)\$(Platform)\</IntDir>
     <OutDir>..\$(ConfigurationName)\$(Platform)\</OutDir>
   </PropertyGroup>
+  <ItemDefinitionGroup>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
+  </ItemDefinitionGroup>
   <PropertyGroup Condition="'$(Platform)'=='Win32'">
     <ArchiveDir>..\..\$(SolutionName)\x86</ArchiveDir>
   </PropertyGroup>
diff --git a/vs2019/version/version.vcxproj b/vs2019/version/version.vcxproj
index 9d149d0..b6ec6f3 100644
--- a/vs2019/version/version.vcxproj
+++ b/vs2019/version/version.vcxproj
@@ -13,4 +13,10 @@
   <Target Name="Build">
     <Exec Command="powershell.exe -ExecutionPolicy Bypass -NoProfile 
-NonInteractive -File $(Script) $(Platform) $(SolutionDir) $(IncludeDir) 
$(SourceDir)" />
   </Target>
+  <Target Name="GetProjectInfoForReference"
+          Returns="@(ProjectInfoForReference)">
+    <ItemGroup>
+      <ProjectInfoForReference Include="@(LibFullPath)" />
+    </ItemGroup>
+  </Target>
 </Project>
diff --git a/vs2019/xennet/xennet.vcxproj b/vs2019/xennet/xennet.vcxproj
index 027dc4a..84597b3 100644
--- a/vs2019/xennet/xennet.vcxproj
+++ b/vs2019/xennet/xennet.vcxproj
@@ -38,6 +38,9 @@
       
<AdditionalDependencies>$(DDK_LIB_PATH)\ndis.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies>
       
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
     </Link>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
diff --git a/vs2019/xennet_coinst/xennet_coinst.vcxproj 
b/vs2019/xennet_coinst/xennet_coinst.vcxproj
index a159abd..d2c5d07 100644
--- a/vs2019/xennet_coinst/xennet_coinst.vcxproj
+++ b/vs2019/xennet_coinst/xennet_coinst.vcxproj
@@ -32,6 +32,9 @@
       
<ModuleDefinitionFile>../../src/coinst/xennet_coinst.def</ModuleDefinitionFile>
       
<AdditionalDependencies>setupapi.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
+    <DriverSign>
+      <FileDigestAlgorithm>sha256</FileDigestAlgorithm>
+    </DriverSign>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
     <ClCompile>
-- 
2.31.1.windows.1




 


Rackspace

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