The KeRestoreExtendedProcessorState routine restores extended processor state information that was previously saved.
VOID KeRestoreExtendedProcessorState( _In_ PXSTATE_SAVE XStateSave );
A pointer to an XSTATE_SAVE structure that contains the extended processor state information to restore. The contents of this structure must have been previously saved by the KeSaveExtendedProcessorState routine.
Kernel-mode driver code must ensure that calls to KeSaveExtendedProcessorState and KeRestoreExtendedProcessorState are properly nested. This is required so that, at each nesting level, the state that was restored by the KeRestoreExtendedProcessorState call is the same state that was saved by the corresponding KeSaveExtendedProcessorState call. To ensure proper nesting, kernel-mode driver code must follow these rules:
A KeRestoreExtendedProcessorState call that restores a saved state must be running at the same IRQL as the KeSaveExtendedProcessorState call that saved the state.
If a pair of KeSaveExtendedProcessorState and KeRestoreExtendedProcessorState calls is nested within a pair of surrounding KeSaveExtendedProcessorState and KeRestoreExtendedProcessorState calls, the IRQL for the nested calls must not be lower than the IRQL for the surrounding calls.
Typically, the caller-allocated XSTATE_SAVE structure that contains the state that was saved by KeSaveExtendedProcessorState resides on the stack. The stack naturally preserves the nesting of saved state information. If driver code stores the state in a location other than the stack, the driver writer must take special care to preserve the nesting of the KeSaveExtendedProcessorState and KeRestoreExtendedProcessorState calls.
The KeRestoreExtendedProcessorState call that restores a saved state must be running in the same thread as the KeSaveExtendedProcessorState call that saved the state.
|Windows version||Available in Windows 7 and later versions of Windows.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)|
|IRQL||"<= DISPATCH_LEVEL (see Remarks section)"|