|
enum | HYPERCALL_CODE {
HvSwitchVirtualAddressSpace = 0x0001
, HvFlushVirtualAddressSpace = 0x0002
, HvFlushVirtualAddressList = 0x0003
, HvGetLogicalProcessorRunTime = 0x0004
,
HvCallNotifyLongSpinWait = 0x0008
, HvCallParkedVirtualProcessors = 0x0009
, HvCallSyntheticClusterIpi = 0x000B
, HvCallModifyVtlProtectionMask = 0x000C
,
HvCallEnablePartitionVtl = 0x000D
, HvCallDisablePartitionVtl = 0x000E
, HvCallEnableVpVtl = 0x000F
, HvCallDisableVpVtl = 0x0010
,
HvCallVtlCall = 0x0011
, HvCallVtlReturn = 0x0012
, HvCallFlushVirtualAddressSpaceEx = 0x0013
, HvCallFlushVirtualAddressListEx = 0x0014
,
HvCallSendSyntheticClusterIpiEx = 0x0015
, HvCreatePartition = 0x0040
, HvInitializePartition = 0x0041
, HvFinalizePartition = 0x0042
,
HvDeletePartition = 0x0043
, HvGetPartitionProperty = 0x0044
, HvSetPartitionProperty = 0x0045
, HvGetPartitionId = 0x0046
,
HvGetNextChildPartition = 0x0047
, HvDepositMemory = 0x0048
, HvWithdrawMemory = 0x0049
, HvGetMemoryBalance = 0x004A
,
HvMapGpaPages = 0x004B
, HvUnmapGpaPages = 0x004C
, HvInstallIntercept = 0x004D
, HvCreateVp = 0x004E
,
HvDeleteVp = 0x004F
, HvGetVpRegisters = 0x0050
, HvSetVpRegisters = 0x0051
, HvTranslateVirtualAddress = 0x0052
,
HvReadGpa = 0x0053
, HvWriteGpa = 0x0054
, HvClearVirtualInterrupt = 0x0056
, HvDeletePort = 0x0058
,
HvConnectPort = 0x0059
, HvGetPortProperty = 0x005A
, HvDisconnectPort = 0x005B
, HvPostMessage = 0x005C
,
HvSignalEvent = 0x005D
, HvSavePartitionState = 0x005E
, HvRestorePartitionState = 0x005F
, HvInitializeEventLogBufferGroup = 0x0060
,
HvFinalizeEventLogBufferGroup = 0x0061
, HvCreateEventLogBuffer = 0x0062
, HvDeleteEventLogBuffer = 0x0063
, HvMapEventLogBuffer = 0x0064
,
HvUnmapEventLogBuffer = 0x0065
, HvSetEventLogGroupSources = 0x0066
, HvReleaseEventLogBuffer = 0x0067
, HvFlushEventLogBuffer = 0x0068
,
HvPostDebugData = 0x0069
, HvRetrieveDebugData = 0x006A
, HvResetDebugSession = 0x006B
, HvMapStatsPage = 0x006C
,
HvUnmapStatsPage = 0x006D
, HvCallMapSparseGpaPages = 0x006E
, HvCallSetSystemProperty = 0x006F
, HvCallSetPortProperty = 0x0070
,
HvCallAddLogicalProcessor = 0x0076
, HvCallRemoveLogicalProcessor = 0x0077
, HvCallQueryNumaDistance = 0x0078
, HvCallSetLogicalProcessorProperty = 0x0079
,
HvCallGetLogicalProcessorProperty = 0x007A
, HvCallGetSystemProperty = 0x007B
, HvCallMapDeviceInterrupt = 0x007C
, HvCallUnmapDeviceInterrupt = 0x007D
,
HvCallRetargetDeviceInterrupt = 0x007E
, HvCallMapDevicePages = 0x0080
, HvCallUnmapDevicePages = 0x0081
, HvCallAttachDevice = 0x0082
,
HvCallDetachDevice = 0x0083
, HvCallNotifyStandbyTransition = 0x0084
, HvCallPrepareForSleep = 0x0085
, HvCallPrepareForHibernate = 0x0086
,
HvCallNotifyPartitionEvent = 0x0087
, HvCallGetLogicalProcessorRegisters = 0x0088
, HvCallSetLogicalProcessorRegisters = 0x0089
, HvCallQueryAssotiatedLpsforMca = 0x008A
,
HvCallNotifyRingEmpty = 0x008B
, HvCallInjectSyntheticMachineCheck = 0x008C
, HvCallScrubPartition = 0x008D
, HvCallCollectLivedump = 0x008E
,
HvCallDisableHypervisor = 0x008F
, HvCallModifySparseGpaPages = 0x0090
, HvCallRegisterInterceptResult = 0x0091
, HvCallUnregisterInterceptResult = 0x0092
,
HvCallAssertVirtualInterrupt = 0x0094
, HvCallCreatePort = 0x0095
, HvCallConnectPort = 0x0096
, HvCallGetSpaPageList = 0x0097
,
HvCallStartVirtualProcessor = 0x009A
, HvCallGetVpIndexFromApicId = 0x009A
, HvCallFlushGuestPhysicalAddressSpace = 0x00AF
, HvCallFlushGuestPhysicalAddressList = 0x00B0
} |
| Hyper-V Hypercalls. More...
|
|
enum | _MOV_TO_DEBUG_REG { AccessToDebugRegister = 0
, AccessFromDebugRegister = 1
} |
| MOV to debug registers states. More...
|
|
|
UCHAR | VmxVmread64 (size_t Field, UINT64 FieldValue) |
| VMX VMREAD instruction (64-bit)
|
|
UCHAR | VmxVmread32 (size_t Field, UINT32 FieldValue) |
| VMX VMREAD instruction (32-bit)
|
|
UCHAR | VmxVmread16 (size_t Field, UINT16 FieldValue) |
| VMX VMREAD instruction (16-bit)
|
|
UCHAR | VmxVmread64P (size_t Field, UINT64 *FieldValue) |
| VMX VMREAD instruction (64-bit)
|
|
UCHAR | VmxVmread32P (size_t Field, UINT32 *FieldValue) |
| VMX VMREAD instruction (32-bit)
|
|
UCHAR | VmxVmread16P (size_t Field, UINT16 *FieldValue) |
| VMX VMREAD instruction (16-bit)
|
|
UCHAR | VmxVmwrite64 (size_t Field, UINT64 FieldValue) |
| VMX VMWRITE instruction (64-bit)
|
|
UCHAR | VmxVmwrite32 (size_t Field, UINT32 FieldValue) |
| VMX VMWRITE instruction (32-bit)
|
|
UCHAR | VmxVmwrite16 (size_t Field, UINT16 FieldValue) |
| VMX VMWRITE instruction (16-bit)
|
|
VOID | VmxVmptrst () |
| Implementation of VMPTRST instruction.
|
|
VOID | VmxVmresume () |
| Resume VM using VMRESUME instruction.
|
|
VOID | VmxVmxoff (VIRTUAL_MACHINE_STATE *VCpu) |
| Prepare and execute Vmxoff instruction.
|
|
BOOLEAN | VmxCheckVmxSupport () |
| Check whether VMX Feature is supported or not.
|
|
BOOLEAN | VmxInitialize () |
| Initialize the VMX operation.
|
|
BOOLEAN | VmxPerformVirtualizationOnAllCores () |
| Initialize essential VMX Operation tasks.
|
|
BOOLEAN | VmxTerminate () |
| Broadcast to terminate VMX on all logical cores.
|
|
VOID | VmxPerformTermination () |
| Terminate Vmx on all logical cores.
|
|
VOID | VmxHandleXsetbv (VIRTUAL_MACHINE_STATE *VCpu) |
| Handling XSETBV Instruction vm-exits.
|
|
VOID | VmxHandleVmxPreemptionTimerVmexit (VIRTUAL_MACHINE_STATE *VCpu) |
| Handling VMX Preemption Timer vm-exits.
|
|
VOID | VmxHandleTripleFaults (VIRTUAL_MACHINE_STATE *VCpu) |
| Handling triple fault VM-exits.
|
|
BOOLEAN | VmxPerformVirtualizationOnSpecificCore () |
| Allocates Vmx regions for all logical cores (Vmxon region and Vmcs region)
|
|
VOID | VmxFixCr4AndCr0Bits () |
| Fix values for cr0 and cr4 bits.
|
|
BOOLEAN | VmxLoadVmcs (_In_ VIRTUAL_MACHINE_STATE *VCpu) |
|
BOOLEAN | VmxClearVmcsState (_In_ VIRTUAL_MACHINE_STATE *VCpu) |
|
BOOLEAN | VmxCheckIsOnVmxRoot () |
| It can deterministically check whether the caller is on vmx-root mode or not.
|
|
BOOLEAN | VmxVirtualizeCurrentSystem (PVOID GuestStack) |
| Initialize VMX Operation.
|
|
BOOLEAN | VmxSetupVmcs (_In_ VIRTUAL_MACHINE_STATE *VCpu, _In_ PVOID GuestStack) |
|
UINT64 | VmxReturnStackPointerForVmxoff () |
| Get the RIP of guest (VMCS_GUEST_RIP) in the case of return from VMXOFF.
|
|
UINT64 | VmxReturnInstructionPointerForVmxoff () |
| Get the RIP of guest (VMCS_GUEST_RIP) in the case of return from VMXOFF.
|
|
BOOLEAN | VmxGetCurrentExecutionMode () |
| Check current execution mode (vmx-root and non-root)
|
|
BOOLEAN | VmxGetCurrentLaunchState () |
| Check if the VMX is launched or not.
|
|
UINT32 | VmxCompatibleStrlen (const CHAR *S) |
| implementation of vmx-root mode compatible strlen
|
|
UINT32 | VmxCompatibleWcslen (const wchar_t *S) |
| implementation of vmx-root mode compatible wcslen
|
|
INT32 | VmxCompatibleStrcmp (const CHAR *Address1, const CHAR *Address2, SIZE_T Num, BOOLEAN IsStrncmp) |
| implementation of vmx-root mode compatible strcmp and strncmp
|
|
INT32 | VmxCompatibleWcscmp (const wchar_t *Address1, const wchar_t *Address2, SIZE_T Num, BOOLEAN IsWcsncmp) |
| implementation of vmx-root mode compatible wcscmp and wcsncmp
|
|
INT32 | VmxCompatibleMemcmp (const CHAR *Address1, const CHAR *Address2, size_t Count) |
| implementation of vmx-root mode compatible memcmp
|
|
VMX Instruction and operation headers.
- Author
- Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
- Version
- 0.1
- Date
- 2020-04-11
- Copyright
- This project is released under the GNU Public License v3.