Superpage support for pmap_page_test_mappings(), pmap_protect(),
Does this comment still apply? I'm not sure what the difference is between dirty and modified is in this context, or where the read/write check is happening.
You may wish to convert this to bool as you did in pmap_unwire(), and same with the above signature. Not necessary as part of this patch however.
Should this be a pmap_invalidate_range() of the original sva and eva (you'd have to save the original sva somewhere)? Presumably at some point we could have pmap_invalidate_range() apply some logic to use pmap_invalidate_all() if there were too many pages? (Right now for bbl you might as well always use invalidate_all, but someday that might not be true.)
That's probably the right long-term direction, but I'd rather not do it in this change, as I'm just following amd64's example and I have no good way of testing the change (pmap_invalidate_range() just executes sfence.vma today).
Dirty and modified mean the same thing in this context, they're used interchangeably. (amd64 has a "modified" bit whereas riscv has a "dirty" bit.) Indeed, the comment should be removed, it was copied from arm64.
Thanks, might as well do it here.