Bewerken

Delen via


KeRestoreExtendedProcessorState function (wdm.h)

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

Syntax

void KeRestoreExtendedProcessorState(
  [in] PXSTATE_SAVE XStateSave
);

Parameters

[in] 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.

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

Requirement Value
Minimum supported client Available in Windows 7 and later versions of Windows.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL (see Remarks section)

See also

KeRestoreFloatingPointState

KeSaveExtendedProcessorState

KeSaveFloatingPointState

XSTATE_SAVE