Repository navigation
Conversation
svenpeter42
requested changes
Nov 15, 2026
| return false; | ||
| } | ||
|
|
||
| if (full_broadcast || full_local) { |
Member
There was a problem hiding this comment.
this could also use a comment why we need a dsb sy + isb just in this special case here
a-ramses
force-pushed
the
m4-hv-memory-permissions
branch
from
November 15, 2026 22:30
eba9293 to
05495b0
Compare
Removing a shadow table from cur[] doesn't mean the CPU has stopped using it. We can still reuse its memory while a CPU is walking the old table, which can send the guest to an unrelated mapping. Keep detached tables around until the CPUs that could still use them have completed a full TLB invalidation. Collection needs the hypervisor lock, so don't do it from the unlocked GENTER/GEXIT path. When the pool fills up, reclaim inactive shadows that have no remaining readers. Pin the owners while updating or building tables so we don't reclaim one halfway through. Signed-off-by: Ramzi Abdiche <abdicheramzi@gmail.com>
a-ramses
force-pushed
the
m4-hv-memory-permissions
branch
from
November 15, 2026 22:36
05495b0 to
646feaa
Compare
svenpeter42
reviewed
Nov 17, 2026
|
|
||
| if (slot == 8) { | ||
| enum mmu_sysreg_result result = hv_sprr_emulate_uperm(ctx, cpu, locked); | ||
| if (result != MMU_SYSREG_UNHANDLED) |
Member
There was a problem hiding this comment.
This is very hard to read, how about a switch instead with all three cases similar to hv_sprr_emulate_sysreg?
Right now a shared shadow mapping becomes writable if either userspace or the kernel can write to it. Making a JIT page writable in userspace can therefore also let the kernel write through a mapping that should be read-only. Keep separate user and kernel shadow views and switch between them on exception entry and return, including guarded transitions. Also handle userspace UPERM accesses with the UMPRR write mask, so the guest can change the permissions it's allowed to change. This lets macOS use its normal JIT permission switching. Keep the commpage xPRR feature value and stop forcing aprr_jit=0. Signed-off-by: Ramzi Abdiche <abdicheramzi@gmail.com>
a-ramses
force-pushed
the
m4-hv-memory-permissions
branch
from
November 17, 2026 22:00
646feaa to
de285a8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix premature shadow-table reuse and separate user/kernel permissions to support protected JIT
Please check all boxes that apply:
Signed-off-by:trailer to every commitAll boxes must be checked before your pull request can be reviewed.