Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ionescu007/SimpleVisor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorionescu007 <aionescu+git@gmail.com>2016-08-30 01:06:08 +0300
committerionescu007 <aionescu+git@gmail.com>2016-08-30 01:06:08 +0300
commitd580e2e5b8bac8b814927242ce773f366db62fde (patch)
tree77467f05c8ac86c8ea3b19dc6f595c6eb817f113 /shvvmxhv.c
parentd9177eedf1993573e06f36beb41455ac36a76d42 (diff)
More portability.
Fix the last few stragglers.
Diffstat (limited to 'shvvmxhv.c')
-rw-r--r--shvvmxhv.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/shvvmxhv.c b/shvvmxhv.c
index 0c78453..ccc2809 100644
--- a/shvvmxhv.c
+++ b/shvvmxhv.c
@@ -38,13 +38,13 @@ ShvVmxResume (
__vmx_vmresume();
}
-ULONG_PTR
+uintptr_t
FORCEINLINE
ShvVmxRead (
_In_ UINT32 VmcsFieldId
)
{
- SIZE_T FieldData;
+ size_t FieldData;
//
// Because VMXREAD returns an error code, and not the data, it is painful
@@ -215,12 +215,12 @@ ShvVmxEntryHandler (
// was actually pushed on the stack right before the call. Go dig into the
// stack to find it, and overwrite the bogus value that's there now.
//
- Context->Rcx = *(PULONG64)((ULONG_PTR)Context - sizeof(Context->Rcx));
+ Context->Rcx = *(UINT64*)((uintptr_t)Context - sizeof(Context->Rcx));
//
// Get the per-VP data for this processor.
//
- vpData = (VOID*)((ULONG_PTR)(Context + 1) - KERNEL_STACK_SIZE);
+ vpData = (VOID*)((uintptr_t)(Context + 1) - KERNEL_STACK_SIZE);
//
// Build a little stack context to make it easier to keep track of certain
@@ -250,8 +250,8 @@ ShvVmxEntryHandler (
// Return the VP Data structure in RAX:RBX which is going to be part of
// the CPUID response that the caller (ShvVpUninitialize) expects back.
//
- Context->Rax = (ULONG_PTR)vpData >> 32;
- Context->Rbx = (ULONG_PTR)vpData & 0xFFFFFFFF;
+ Context->Rax = (uintptr_t)vpData >> 32;
+ Context->Rbx = (uintptr_t)vpData & 0xFFFFFFFF;
//
// When running in VMX root mode, the processor will set limits of the
@@ -307,7 +307,7 @@ ShvVmxEntryHandler (
// needed as RtlRestoreContext will fix all the GPRs, and what we just
// did to RSP will take care of the rest.
//
- Context->Rip = (ULONG64)ShvVmxResume;
+ Context->Rip = (UINT64)ShvVmxResume;
}
//