Expand Minimize

KeRestoreExtendedProcessorState routine

The KeRestoreExtendedProcessorState routine restores extended processor state information that was previously saved.

Syntax


VOID KeRestoreExtendedProcessorState(
  _In_  PXSTATE_SAVE XStateSave
);

Parameters

XStateSave [in]

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.

Return value

None

Remarks

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.

A similar set of rules apply to the KeSaveFloatingPointState and KeRestoreFloatingPointState routines.

Requirements

Version

Available in Windows 7 and later versions of Windows.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<= DISPATCH_LEVEL (see Remarks section)

See also

KeRestoreFloatingPointState
KeSaveExtendedProcessorState
KeSaveFloatingPointState
XSTATE_SAVE

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft