This repository was archived by the owner on Jan 28, 2023. It is now read-only.
Commit 6e2de31
committed
Revert "windows: Use queued spin locks"
This reverts commit 5cfb841.
The said patch is seriously flawed:
1. It calls the wrong Windows Driver Kit functions. E.g.,
KeAcquireInStackQueuedSpinLockAtDpcLevel() should only be called
when IRQL = DISPATCH_LEVEL, but most of HAXM code runs below
that level. The more general KeAcquireInStackQueuedSpinLock()
should be used instead.
2. Unlike the release of a regular spin lock, which is a simple
operation, the release of a queued spin lock needs to wait for a
condition and thus may block. If called from a function that
should never block, e.g. ept_tree_alloc_page(), a deadlock may
occur.
Fall back to regular spin locks which do not block on release.1 parent 428a9da commit 6e2de31
2 files changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 105 | + | |
| 106 | + | |
110 | 107 | | |
111 | 108 | | |
112 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
85 | | - | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
0 commit comments