]> rtime.felk.cvut.cz Git - l4.git/blobdiff - kernel/fiasco/src/kern/ia32/vm_svm.cpp
update
[l4.git] / kernel / fiasco / src / kern / ia32 / vm_svm.cpp
index a42a422f9b01ff043d1cba6d2821120281bf6490..bf6a27acab5d39abaa54973b402e6c8fe19122e4 100644 (file)
@@ -681,7 +681,7 @@ Vm_svm::resume_vcpu(Context *ctxt, Vcpu_state *vcpu, bool user_mode)
 
       int r = do_resume_vcpu(ctxt, vcpu, vmcb_s);
 
-      // test for error or non-IRQ exit resason
+      // test for error or non-IRQ exit reason
       if (r <= 0)
        return r;
 
@@ -695,8 +695,10 @@ Vm_svm::resume_vcpu(Context *ctxt, Vcpu_state *vcpu, bool user_mode)
       // leave the kernel to not overwrite the vcpu-regs
       // with bogus state.
       Thread *t = nonull_static_cast<Thread*>(ctxt);
-      if (t->exception_triggered())
-       t->fast_return_to_user(vcpu->_entry_ip, vcpu->_entry_sp, t->vcpu_state().usr().get());
+
+      if (t->continuation_test_and_restore())
+        t->fast_return_to_user(vcpu->_entry_ip, vcpu->_entry_sp,
+                               t->vcpu_state().usr().get());
     }
 }