[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH 1/2] Clean up watches, suspend handlers and events on D0->D3
* Call XenIfaceCleanup on D0->D3 transition * Change XenIfaceCleanup to accept a NULL file object, which will clean up everything, regardless of file object Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx> --- src/xeniface/fdo.c | 1 + src/xeniface/ioctls.c | 11 +++++++---- src/xeniface/ioctls.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/xeniface/fdo.c b/src/xeniface/fdo.c index 19e50fe..c1c3901 100644 --- a/src/xeniface/fdo.c +++ b/src/xeniface/fdo.c @@ -1050,6 +1050,7 @@ FdoD0ToD3( Trace("====>\n"); WmiSessionsSuspendAll(Fdo); + XenIfaceCleanup(Fdo, NULL); PowerState.DeviceState = PowerDeviceD3; PoSetPowerState(Fdo->Dx->DeviceObject, diff --git a/src/xeniface/ioctls.c b/src/xeniface/ioctls.c index 639b015..ca94658 100644 --- a/src/xeniface/ioctls.c +++ b/src/xeniface/ioctls.c @@ -137,7 +137,7 @@ _IRQL_requires_(PASSIVE_LEVEL) // EvtchnFree calls KeFlushQueuedDpcs VOID XenIfaceCleanup( __in PXENIFACE_FDO Fdo, - __in PFILE_OBJECT FileObject + __in_opt PFILE_OBJECT FileObject ) { PLIST_ENTRY Node; @@ -154,7 +154,8 @@ XenIfaceCleanup( StoreContext = CONTAINING_RECORD(Node, XENIFACE_STORE_CONTEXT, Entry); Node = Node->Flink; - if (StoreContext->FileObject != FileObject) + if (FileObject != NULL && + StoreContext->FileObject != FileObject) continue; XenIfaceDebugPrint(TRACE, "Store context %p\n", StoreContext); @@ -171,7 +172,8 @@ XenIfaceCleanup( EvtchnContext = CONTAINING_RECORD(Node, XENIFACE_EVTCHN_CONTEXT, Entry); Node = Node->Flink; - if (EvtchnContext->FileObject != FileObject) + if (FileObject != NULL && + EvtchnContext->FileObject != FileObject) continue; XenIfaceDebugPrint(TRACE, "Evtchn context %p\n", EvtchnContext); @@ -197,7 +199,8 @@ XenIfaceCleanup( SuspendContext = CONTAINING_RECORD(Node, XENIFACE_SUSPEND_CONTEXT, Entry); Node = Node->Flink; - if (SuspendContext->FileObject != FileObject) + if (FileObject != NULL && + SuspendContext->FileObject != FileObject) continue; XenIfaceDebugPrint(TRACE, "Suspend context %p\n", SuspendContext); diff --git a/src/xeniface/ioctls.h b/src/xeniface/ioctls.h index 14da674..16af0a2 100644 --- a/src/xeniface/ioctls.h +++ b/src/xeniface/ioctls.h @@ -119,7 +119,7 @@ _IRQL_requires_(PASSIVE_LEVEL) VOID XenIfaceCleanup( __in PXENIFACE_FDO Fdo, - __in PFILE_OBJECT FileObject + __in_opt PFILE_OBJECT FileObject ); DECLSPEC_NOINLINE -- 1.9.4.msysgit.1 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |