[kernel][vm] Optimize protect ranges

Optimizes the protection of ranges by taking into account the previous
arch mmu flags for each range being modified. Knowing the previous
flags lets us skip manipulating the arch aspace in some circumstances
where we know it would be redundant.

In particular, without knowing the previous permissions if the new
permissions had WRITE, we would have to protect to the new permissions
minus WRITE, even if the new permissions were the same as the old ones.
Now this scenario can be identified and skipped.

Bug: 90014
Change-Id: I9d2bd3993eecb64cadb5bdcb0cb308fa8a9ea1c3
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/622424
Reviewed-by: Rasha Eqbal <rashaeqbal@google.com>
Commit-Queue: Adrian Danis <adanis@google.com>
2 files changed
tree: c66b2f6788b8dc7444a28dd44354ef0c2f13db91
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. garnet/
  7. products/
  8. scripts/
  9. sdk/
  10. src/
  11. third_party/
  12. tools/
  13. zircon/
  14. .clang-format
  15. .clang-tidy
  16. .git-blame-ignore-revs
  17. .gitattributes
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. analysis_options.yaml
  22. AUTHORS
  23. BUILD.gn
  24. CODE_OF_CONDUCT.md
  25. CONTRIBUTING.md
  26. LICENSE
  27. OWNERS
  28. PATENTS
  29. pyrightconfig.json
  30. README.md
  31. rustfmt.toml
README.md

Fuchsia

What is Fuchsia?

Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.

We expect everyone interacting with our project to respect our code of conduct.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.