From d2894e306403cb00428c6c1fd943ebeee0118f4c Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Wed, 15 Mar 2017 08:34:06 -0700 Subject: Final RS2 Fix and Disable EPTs -- WHEA errors on some systems. --- nt/shvos.c | 11 +++++++++-- shv_x.h | 2 -- shvvmx.c | 4 +++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/nt/shvos.c b/nt/shvos.c index af143e6..e93abaf 100644 --- a/nt/shvos.c +++ b/nt/shvos.c @@ -51,10 +51,9 @@ KeSignalCallDpcSynchronize ( ); DECLSPEC_NORETURN -NTSYSAPI VOID __cdecl -RtlRestoreContext ( +ShvOsRestoreContext2 ( _In_ PCONTEXT ContextRecord, _In_opt_ struct _EXCEPTION_RECORD * ExceptionRecord ); @@ -243,6 +242,14 @@ ShvOsRunCallbackOnProcessors ( KeGenericCallDpc(ShvOsDpcRoutine, &dpcContext); } +VOID +ShvOsRestoreContext( + _In_ PCONTEXT ContextRecord + ) +{ + ShvOsRestoreContext2(ContextRecord, NULL); +} + VOID ShvOsCaptureContext ( _In_ PCONTEXT ContextRecord diff --git a/shv_x.h b/shv_x.h index 76d1257..624b978 100644 --- a/shv_x.h +++ b/shv_x.h @@ -25,8 +25,6 @@ Environment: #include "vmx.h" -#define ShvOsRestoreContext RtlRestoreContext - #define SHV_STATUS_SUCCESS 0 #define SHV_STATUS_NOT_AVAILABLE -1 #define SHV_STATUS_NO_RESOURCES -2 diff --git a/shvvmx.c b/shvvmx.c index f4f39b9..4e7a558 100644 --- a/shvvmx.c +++ b/shvvmx.c @@ -93,8 +93,10 @@ ShvVmxEnterRootModeOnVp ( { // // Enable EPT if these features are supported + // Temporarily Disable // - VpData->EptControls = SECONDARY_EXEC_ENABLE_EPT | SECONDARY_EXEC_ENABLE_VPID; + VpData->EptControls = 0; + //VpData->EptControls = SECONDARY_EXEC_ENABLE_EPT | SECONDARY_EXEC_ENABLE_VPID; } // -- cgit v1.2.3