|
Bitdefender Hypervisor Memory Introspection
|
Go to the source code of this file.
Functions | |
| INTSTATUS | IntHookXcrSetHook (DWORD Xcr, DWORD Flags, PFUNC_XcrWriteHookCallback Callback, void *Context, HOOK_XCR **Hook) |
| Set an extended control register write hook. More... | |
| static INTSTATUS | IntHookXcrDeleteHook (HOOK_XCR *Hook) |
| Permanently delete an extended control register hook. More... | |
| INTSTATUS | IntHookXcrRemoveHook (HOOK_XCR *Hook) |
| Remove an extended control register hook. More... | |
| static void | IntHookXcrRemoveAllHooks (void) |
| Remove all extended control register write hooks. More... | |
| INTSTATUS | IntHookXcrCommit (void) |
| Commit the extended control register hooks. More... | |
| INTSTATUS | IntHookXcrInit (void) |
| Initialize the extended control registers hook state. More... | |
| INTSTATUS | IntHookXcrUninit (void) |
| Uninit the extended control register hooks state. More... | |
| INTSTATUS IntHookXcrCommit | ( | void | ) |
Commit the extended control register hooks.
This function will iterate the list of XCR hooks, and it will delete all the hooks that were flagged for removal.
| INT_STATUS_SUCCESS | On success. |
| INT_STATUS_NOT_INITIALIZED | If the XCR hooks state is not initialized. |
Definition at line 169 of file hook_xcr.c.
Referenced by IntGuestPreReturnCallback().
Permanently delete an extended control register hook.
NOTE: When the last XCR hook is removed, the XCR notifications callback will be unregistered from the integrator.
| [in] | Hook | The XCR hook to be deleted. |
| INT_STATUS_SUCCESS | On success. |
| INT_STATUS_INVALID_PARAMETER | If an invalid parameter is supplied. |
Definition at line 79 of file hook_xcr.c.
Referenced by IntHookXcrCommit(), and IntHookXcrRemoveHook().
| INTSTATUS IntHookXcrInit | ( | void | ) |
Initialize the extended control registers hook state.
| INT_STATUS_SUCCESS | On success. |
| INT_STATUS_INSUFFICIENT_RESOURCES | If a memory alloc fails. |
Definition at line 207 of file hook_xcr.c.
Referenced by IntGuestInit().
|
static |
Remove all extended control register write hooks.
Definition at line 150 of file hook_xcr.c.
Referenced by IntHookXcrUninit().
Remove an extended control register hook.
Removes an XCR write hook. First of all, this function will mark the hook as being disabled (the callback will never be called again). If we are currently in the context of a XCR violation, we will wait for the commit phase to permanently delete the hook. Otherwise, the hook will be deleted immediately.
| [in] | Hook | The hook to be removed. |
| INT_STATUS_SUCCESS | On success. |
| INT_STATUS_INVALID_PARAMETER | If an invalid parameter is supplied. |
Definition at line 110 of file hook_xcr.c.
Referenced by IntHandleXcrWrite(), and IntHookXcrRemoveAllHooks().
| INTSTATUS IntHookXcrSetHook | ( | DWORD | Xcr, |
| DWORD | Flags, | ||
| PFUNC_XcrWriteHookCallback | Callback, | ||
| void * | Context, | ||
| HOOK_XCR ** | Hook | ||
| ) |
Set an extended control register write hook.
This function will place an XCR write hook. Currently, only XCR0 is defined by Intel. When the first XCR hook is set, the notification callback will be registered to the integrator.
| [in] | Xcr | The intercepted XCR. |
| [in] | Flags | Flags. Can be used by the caller. |
| [in] | Callback | The callback to be called when the indicated XCR is written. |
| [in] | Context | Optional context. |
| [out] | Hook | A handle to the newly placed hook. |
| INT_STATUS_SUCCESS | On success. |
| INT_STATUS_INVALID_PARAMETER | If an invalid parameter is supplied. |
| INT_STATUS_INSUFFICIENT_RESOURCES | If a memory alloc failed. |
Definition at line 11 of file hook_xcr.c.
| INTSTATUS IntHookXcrUninit | ( | void | ) |
Uninit the extended control register hooks state.
| INT_STATUS_SUCCESS | On success. |
| INT_STATUS_NOT_INITIALIZED_HINT | If the XCR hooks state is not initialized. |
Definition at line 230 of file hook_xcr.c.
Referenced by IntGuestUninit().