https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ae39ad4d1057fb4438b55…
commit ae39ad4d1057fb4438b55bd3cf8e6c79101cbd56
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Jul 23 13:35:14 2022 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Aug 4 16:15:24 2022 +0200
[NTOS] Add a hack for VBox
---
ntoskrnl/ke/amd64/trap.S | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ntoskrnl/ke/amd64/trap.S b/ntoskrnl/ke/amd64/trap.S
index 644b4c2032d..0b4f0375af2 100644
--- a/ntoskrnl/ke/amd64/trap.S
+++ b/ntoskrnl/ke/amd64/trap.S
@@ -316,6 +316,10 @@ ENDFUNC
PUBLIC KiDoubleFaultAbort
FUNC KiDoubleFaultAbort
+
+ /* Hack for VBox, which "forgets" to push an error code on the stack! */
+ and rsp, HEX(FFFFFFFFFFFFFFF0)
+
/* A zero error code is pushed */
EnterTrap (TF_HAS_ERROR_CODE OR TF_SAVE_ALL)