69 if (NULL == CurrentPendingUD)
89 *CurrentPendingUD = infoUD;
107 if (NULL != InfoUD && NULL != *InfoUD)
129 if (Cr3 == pInfoUD->Cr3)
131 WARNING(
"[WARNING] There are still pending UDs in the list when process terminates (will remove them) " 132 "CR3: 0x%016llx RIP: 0x%016llx THREAD: 0x%016llx\n",
133 pInfoUD->Cr3, pInfoUD->Rip, pInfoUD->Thread);
167 if (Cr3 == pInfoUD->Cr3 && Rip == pInfoUD->Rip && Thread == pInfoUD->Thread)
169 TRACE(
"[INFO] Already an UD pending for CR3: 0x%016llx RIP: 0x%016llx THREAD: 0x%016llx\n",
170 pInfoUD->Cr3, pInfoUD->Rip, pInfoUD->Thread);
INTSTATUS IntUDAddToPendingList(const QWORD Cr3, const QWORD Rip, const QWORD Thread, INFO_UD_PENDING **CurrentPendingUD)
Add a new UD to the list of pending injections.
#define INT_STATUS_SUCCESS
void IntUDRemoveEntry(INFO_UD_PENDING **InfoUD)
Remove a pending UD entry.
QWORD Cr3
Target virtual address space.
#define HpAllocWithTag(Len, Tag)
int INTSTATUS
The status data type.
PVCPU_STATE VcpuArray
Array of the VCPUs assigned to this guest. The index in this array matches the VCPU number...
QWORD Thread
Software thread ID.
static BOOLEAN RemoveEntryList(LIST_ENTRY *Entry)
#define INT_STATUS_INVALID_PARAMETER_4
#define HpFreeAndNullWithTag(Add, Tag)
INFO_UD_PENDING * CurrentUD
The currently pending #UD injection on this CPU.
LIST_HEAD gListPendingUD
The list of pending UD injections. Once a UD gets injected, its entry will be removed from this list...
static void InsertTailList(LIST_ENTRY *ListHead, LIST_ENTRY *Entry)
LIST_ENTRY Link
List entry element.
void IntUDRemoveAllEntriesForCr3(const QWORD Cr3)
Remove all pending UD entries for a given virtual address space.
DWORD CpuCount
The number of logical CPUs.
GUEST_STATE gGuest
The current guest state.
INFO_UD_PENDING * IntUDGetEntry(const QWORD Cr3, const QWORD Rip, const QWORD Thread)
Get a UD entry for the provided Cr3, Rip and Thread ID.
#define LIST_HEAD_INIT(Name)
#define INT_STATUS_INVALID_PARAMETER_1
#define list_for_each(_head, _struct_type, _var)
#define INT_STATUS_INVALID_PARAMETER_2
#define INT_STATUS_INSUFFICIENT_RESOURCES
#define INT_STATUS_INVALID_PARAMETER_3