HyperDbg Debugger
Loading...
Searching...
No Matches
Vpid.c File Reference

VPID Implementations. More...

#include "pch.h"

Functions

_Use_decl_annotations_ VOID VpidInvvpid (INVVPID_TYPE Type, INVVPID_DESCRIPTOR *Descriptor)
 INVVPID Instruction.
_Use_decl_annotations_ VOID VpidInvvpidIndividualAddress (UINT16 Vpid, UINT64 LinearAddress)
 INVVPID instruction to invalidate a special address.
VOID VpidInvvpidSingleContext (UINT16 Vpid)
 INVVPID Single Context.
VOID VpidInvvpidAllContext ()
 INVVPID All Contexts.
VOID VpidInvvpidSingleContextRetainingGlobals (UINT16 Vpid)
 INVVPID Single Context Retaining Globals.

Detailed Description

VPID Implementations.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.1
Date
2020-04-11

Function Documentation

◆ VpidInvvpid()

_Use_decl_annotations_ VOID VpidInvvpid ( INVVPID_TYPE Type,
INVVPID_DESCRIPTOR * Descriptor )

INVVPID Instruction.

Parameters
Type
Descriptor
Returns
VOID
24{
25 INVVPID_DESCRIPTOR * TargetDescriptor = NULL;
26 INVVPID_DESCRIPTOR ZeroDescriptor = {0};
27
28 // No need to do anything if VPID is not supported.
30 {
31 return;
32 }
33
34 if (!Descriptor)
35 {
36 TargetDescriptor = &ZeroDescriptor;
37 }
38 else
39 {
40 TargetDescriptor = Descriptor;
41 }
42
43 AsmInvvpid(Type, TargetDescriptor);
44}
UCHAR AsmInvvpid(ULONG Type, PVOID Descriptors)
INVVPID wrapper.
BOOLEAN g_IsVpidSupported
Whether VPID is supported or not.
Definition GlobalVariables.h:215
NULL()
Definition test-case-generator.py:530

◆ VpidInvvpidAllContext()

VOID VpidInvvpidAllContext ( )

INVVPID All Contexts.

Returns
VOID
81{
82 VpidInvvpid(InvvpidAllContext, NULL);
83}
_Use_decl_annotations_ VOID VpidInvvpid(INVVPID_TYPE Type, INVVPID_DESCRIPTOR *Descriptor)
INVVPID Instruction.
Definition Vpid.c:23

◆ VpidInvvpidIndividualAddress()

_Use_decl_annotations_ VOID VpidInvvpidIndividualAddress ( UINT16 Vpid,
UINT64 LinearAddress )

INVVPID instruction to invalidate a special address.

Parameters
Vpid
LinearAddress
Returns
VOID
56{
57 INVVPID_DESCRIPTOR Descriptor = {Vpid, 0, 0, LinearAddress};
58 VpidInvvpid(InvvpidIndividualAddress, &Descriptor);
59}

◆ VpidInvvpidSingleContext()

VOID VpidInvvpidSingleContext ( UINT16 Vpid)

INVVPID Single Context.

Parameters
Vpid
Returns
VOID
69{
70 INVVPID_DESCRIPTOR Descriptor = {Vpid, 0, 0, 0};
71 VpidInvvpid(InvvpidSingleContext, &Descriptor);
72}

◆ VpidInvvpidSingleContextRetainingGlobals()

VOID VpidInvvpidSingleContextRetainingGlobals ( UINT16 Vpid)

INVVPID Single Context Retaining Globals.

Parameters
Vpid
Returns
VOID
93{
94 INVVPID_DESCRIPTOR Descriptor = {Vpid, 0, 0, 0};
95 VpidInvvpid(InvvpidSingleContextRetainingGlobals, &Descriptor);
96}