This adds some new parameters to UnmapPage and UnmapPages. The important one is a "_flags" pointer to UnmapPage, which if specified will be filled with the page flags instead of PageUnmapped() being called (and Flush() won't be invoked, either.) This removes the remaining PAGE_STATE_* changes from VM architecture code. Change-Id: Iacbc424dd8a75a79986edcd7f04d15a10f773c87 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8728 Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>