From 06ab1fe1bc83ae8bae0d920488b242cc0ae09f62 Mon Sep 17 00:00:00 2001 From: leecher1337 Date: Sat, 16 Mar 2019 13:38:33 +0100 Subject: [PATCH] Fix for VMX_EXIT_FAILED_VMENTER_GS when entering VM after a STI on HAX_DEBUG_ENABLE --- core/vcpu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/vcpu.c b/core/vcpu.c index e43ee356..43487307 100644 --- a/core/vcpu.c +++ b/core/vcpu.c @@ -1070,6 +1070,11 @@ static void load_dirty_vmcs_fields(struct vcpu_t *vcpu) vcpu->rflags_dirty = 1; vcpu->debug_control_dirty = 0; } + if ((vcpu->debug_control & HAX_DEBUG_STEP) && + (vmx(vcpu, interruptibility_state).raw & 3u)) { + vmx(vcpu, interruptibility_state).raw &= ~3u; + vcpu->interruptibility_dirty = 1; + } if (vcpu->rflags_dirty) { vmwrite(vcpu, GUEST_RFLAGS, state->_rflags); vcpu->rflags_dirty = 0;