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-29 08:27:03 +0300
committerionescu007 <aionescu+git@gmail.com>2016-08-29 08:27:03 +0300
commit20e2c570c3c5ca080143fb49c2d340a66d494e04 (patch)
tree900b3bacf594d7f50d8df51f4635ac007c5dc322
parentbc631c7fb0eaf31069e5439030aa4c2e833ca90e (diff)
Uee nice define.
-rw-r--r--ntint.h2
-rw-r--r--shvvp.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ntint.h b/ntint.h
index 6ffb5a4..a78068c 100644
--- a/ntint.h
+++ b/ntint.h
@@ -78,6 +78,8 @@ typedef struct _KDESCRIPTOR {
#define MTRR_TYPE_WB 6
+#define EFLAGS_ALIGN_CHECK 0x40000
+
typedef union _KGDTENTRY64 {
struct {
USHORT LimitLow;
diff --git a/shvvp.c b/shvvp.c
index 8552b26..46fcf17 100644
--- a/shvvp.c
+++ b/shvvp.c
@@ -90,7 +90,7 @@ ShvVpRestoreAfterLaunch (
//
// Record that VMX is now enabled
//
- vpData->ContextFrame.EFlags |= (1 << 18);
+ vpData->ContextFrame.EFlags |= EFLAGS_ALIGN_CHECK;
//
// And finally, restore the context, so that all register and stack
@@ -123,7 +123,7 @@ ShvVpInitialize (
// returns here with our registers restored.
//
RtlCaptureContext(&Data->ContextFrame);
- if ((__readeflags() & (1 << 18)) == 0)
+ if ((__readeflags() & EFLAGS_ALIGN_CHECK) == 0)
{
//
// If the AC bit is not set in EFLAGS, it means that we have not yet