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

Re: [win-pv-devel] [PATCH v2] Define NT_PROCESSOR_GROUPS for VS2012 project



> -----Original Message-----
> From: win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx [mailto:win-pv-devel-
> bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of Owen Smith
> Sent: 30 October 2015 17:39
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith
> Subject: [win-pv-devel] [PATCH v2] Define NT_PROCESSOR_GROUPS for
> VS2012 project
> 
> Previous patch missed the obvious compatability macros provided
> and used by xenbus.
> Also fixes a few badly formed ASSERTions
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
> ---
>  src/xeniface/driver.c            | 2 ++
>  src/xeniface/fdo.c               | 1 +
>  src/xeniface/ioctl_evtchn.c      | 6 ++++--
>  src/xeniface/ioctls.c            | 4 +++-
>  vs2012/xeniface/xeniface.vcxproj | 4 ++--
>  5 files changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/src/xeniface/driver.c b/src/xeniface/driver.c
> index f4e8240..a843d00 100644
> --- a/src/xeniface/driver.c
> +++ b/src/xeniface/driver.c
> @@ -30,6 +30,7 @@
>   */
> 
>  #include <ntifs.h>
> +#include <procgrp.h>
>  #include <version.h>
> 
>  #include "fdo.h"
> @@ -149,6 +150,7 @@ DriverEntry(
>      ASSERT3P(DriverObject, ==, NULL);
> 
>      ExInitializeDriverRuntime(DrvRtPoolNxOptIn);
> +    WdmlibProcgrpInitialize();
> 
>      Trace("====>\n");
> 
> diff --git a/src/xeniface/fdo.c b/src/xeniface/fdo.c
> index 71ffbe2..fdb3edf 100644
> --- a/src/xeniface/fdo.c
> +++ b/src/xeniface/fdo.c
> @@ -31,6 +31,7 @@
> 
> 
>  #include <ntifs.h>
> +#include <procgrp.h>
>  #include <wdmguid.h>
>  #include <ntstrsafe.h>
>  #include <stdlib.h>
> diff --git a/src/xeniface/ioctl_evtchn.c b/src/xeniface/ioctl_evtchn.c
> index 93f1931..3b8ecb5 100644
> --- a/src/xeniface/ioctl_evtchn.c
> +++ b/src/xeniface/ioctl_evtchn.c
> @@ -29,6 +29,8 @@
>   * SUCH DAMAGE.
>   */
> 
> +#include <ntifs.h>
> +#include <procgrp.h>
>  #include "driver.h"
>  #include "ioctls.h"
>  #include "xeniface_ioctls.h"
> @@ -51,7 +53,7 @@ EvtchnNotificationDpc(
>      UNREFERENCED_PARAMETER(_Context);
>      UNREFERENCED_PARAMETER(Argument2);
> 
> -    ASSERT(Context);
> +    ASSERT(Context != NULL);
> 
>  #if DBG
>      XenIfaceDebugPrint(INFO, "Channel %p, LocalPort %d, Cpu %lu\n",
> @@ -80,7 +82,7 @@ EvtchnInterruptHandler(
>      ULONG ProcIndex;
> 
>      UNREFERENCED_PARAMETER(Interrupt);
> -    ASSERT(Context);
> +    ASSERT(Context != NULL);
> 
>      KeGetCurrentProcessorNumberEx(&ProcNumber);
>      ProcIndex = KeGetProcessorIndexFromNumber(&ProcNumber);
> diff --git a/src/xeniface/ioctls.c b/src/xeniface/ioctls.c
> index b306a45..b93fd56 100644
> --- a/src/xeniface/ioctls.c
> +++ b/src/xeniface/ioctls.c
> @@ -30,6 +30,8 @@
>   * SUCH DAMAGE.
>   */
> 
> +#include <ntifs.h>
> +#include <procgrp.h>
>  #include "driver.h"
>  #include "ioctls.h"
>  #include "xeniface_ioctls.h"
> @@ -97,7 +99,7 @@ XenIfaceCleanup(
>      KIRQL Irql;
>      LIST_ENTRY ToFree;
> 
> -    XenIfaceDebugPrint(TRACE, "FO %p, IRQL %d, Cpu %lu\n", FileObject,
> KeGetCurrentIrql(), KeGetCurrentProcessorNumber());
> +    //XenIfaceDebugPrint(TRACE, "FO %p, IRQL %d, Cpu %lu\n", FileObject,
> KeGetCurrentIrql(), KeGetCurrentProcessorNumber());
> 

This hunk looks unrelated. I'll drop it when I commit.

  Paul

>      // store watches
>      KeAcquireSpinLock(&Fdo->StoreWatchLock, &Irql);
> diff --git a/vs2012/xeniface/xeniface.vcxproj
> b/vs2012/xeniface/xeniface.vcxproj
> index fadc1d1..c57e2a2 100644
> --- a/vs2012/xeniface/xeniface.vcxproj
> +++ b/vs2012/xeniface/xeniface.vcxproj
> @@ -32,7 +32,7 @@
> 
>      <ItemDefinitionGroup>
>               <ClCompile>
> -
>       <PreprocessorDefinitions>__MODULE__="XENIFACE";POOL_NX_OP
> TIN=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
> +
>       <PreprocessorDefinitions>__MODULE__="XENIFACE";POOL_NX_OP
> TIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</Preprocessor
> Definitions>
>                       <WarningLevel>EnableAllWarnings</WarningLevel>
> 
>       <DisableSpecificWarnings>4711;4548;4820;4668;4255;6001;6054;%(Dis
> ableSpecificWarnings)</DisableSpecificWarnings>
> 
>       <MultiProcessorCompilation>true</MultiProcessorCompilation>
> @@ -40,7 +40,7 @@
>               </ClCompile>
>               <Link>
> 
>       <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionH
> andlers>
> -
>       <AdditionalDependencies>$(DDK_LIB_PATH)\ntstrsafe.lib;%(Additio
> nalDependencies)</AdditionalDependencies>
> +
>       <AdditionalDependencies>$(DDK_LIB_PATH)\ntstrsafe.lib;$(DDK_LI
> B_PATH)\procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies
> >
> 
>       <EnableCOMDATFolding>false</EnableCOMDATFolding>
>               </Link>
>               <Inf>
> --
> 1.9.4.msysgit.1
> 
> 
> _______________________________________________
> 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®.