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

Re: [win-pv-devel] [PATCH 2/6] Refactor WmiFireSuspendEvent



> -----Original Message-----
> From: win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx [mailto:win-pv-devel-
> bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of Owen Smith
> Sent: 29 October 2015 14:50
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith
> Subject: [win-pv-devel] [PATCH 2/6] Refactor WmiFireSuspendEvent
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

Acked-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
>  src/xeniface/fdo.c |  2 +-
>  src/xeniface/wmi.c | 29 ++++++++++++++++++-----------
>  src/xeniface/wmi.h |  9 +++++----
>  3 files changed, 24 insertions(+), 16 deletions(-)
> 
> diff --git a/src/xeniface/fdo.c b/src/xeniface/fdo.c
> index f7aa542..b32e506 100644
> --- a/src/xeniface/fdo.c
> +++ b/src/xeniface/fdo.c
> @@ -782,7 +782,7 @@ FdoD3ToD0(
>      status = XENBUS_SUSPEND(Register,
>                              &Fdo->SuspendInterface,
>                              SUSPEND_CALLBACK_LATE,
> -                            FireSuspendEvent,
> +                            WmiFireSuspendEvent,
>                              Fdo,
>                              &Fdo->SuspendCallbackLate);
>      if (!NT_SUCCESS(status))
> diff --git a/src/xeniface/wmi.c b/src/xeniface/wmi.c
> index 0b14e9b..0ae87d4 100644
> --- a/src/xeniface/wmi.c
> +++ b/src/xeniface/wmi.c
> @@ -753,18 +753,25 @@ SessionFindWatchLocked(XenStoreSession
> *session,
> 
>  }
> 
> -void FireSuspendEvent(PXENIFACE_FDO fdoData) {
> -    XenIfaceDebugPrint(ERROR,"Ready to unsuspend Event\n");
> -    KeSetEvent(&fdoData->registryWriteEvent, IO_NO_INCREMENT, FALSE);
> -    if (fdoData->WmiReady) {
> -        XenIfaceDebugPrint(TRACE,"Fire Suspend Event\n");
> -        WmiFireEvent(fdoData->Dx->DeviceObject,
> -                     (LPGUID)&OBJECT_GUID(XenStoreUnsuspendedEvent),
> -                     0,
> -                     0,
> -                     NULL);
> -    }
> +VOID
> +WmiFireSuspendEvent(
> +    IN  PXENIFACE_FDO   Fdo
> +    )
> +{
> +    XenIfaceDebugPrint(ERROR, "Ready to unsuspend Event\n");
> +    KeSetEvent(&Fdo->registryWriteEvent, IO_NO_INCREMENT, FALSE);
> +
> +    if (!Fdo->WmiReady)
> +        return;
> +
> +    XenIfaceDebugPrint(TRACE, "Fire Suspend Event\n");
> +    WmiFireEvent(Fdo->Dx->DeviceObject,
> +                 (LPGUID)&OBJECT_GUID(XenStoreUnsuspendedEvent),
> +                 0,
> +                 0,
> +                 NULL);
>  }
> +
>  void FireWatch(XenStoreWatch* watch) {
>      UCHAR * eventdata;
>      ULONG RequiredSize;
> diff --git a/src/xeniface/wmi.h b/src/xeniface/wmi.h
> index f677ee3..b9dd256 100644
> --- a/src/xeniface/wmi.h
> +++ b/src/xeniface/wmi.h
> @@ -43,6 +43,11 @@ WmiProcessMinorFunction(
>      IN  PIRP            Irp
>      );
> 
> +extern VOID
> +WmiFireSuspendEvent(
> +    IN  PXENIFACE_FDO   Fdo
> +    );
> +
>  NTSTATUS
>  WmiInit(
>      PXENIFACE_FDO FdoData
> @@ -54,10 +59,6 @@ WmiFinalise(
>      PXENIFACE_FDO FdoData
>  );
> 
> -void FireSuspendEvent(
> -    IN OUT PXENIFACE_FDO fdoData
> -    );
> -
>  void SessionsResumeAll(
>      XENIFACE_FDO *fdoData
>  );
> --
> 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®.