Skip to content

feat: support remapping huge pages and freeing subtrees#5

Open
zhangyx827 wants to merge 1 commit intoStarry-OS:mainfrom
zhangyx827:feat/huge-page-remap
Open

feat: support remapping huge pages and freeing subtrees#5
zhangyx827 wants to merge 1 commit intoStarry-OS:mainfrom
zhangyx827:feat/huge-page-remap

Conversation

@zhangyx827
Copy link
Copy Markdown

  • Support PageSize::Size1G
    • Locate the P3 entry (handles M::LEVELS == 3/4), replace it with a huge-page PTE via GenericPTE::new_page(pa, flags,
      true)
    • Save the previous lower-level table address and free the old P2 subtree with dealloc_tree(p2table_paddr, M::LEVELS - 2)
  • Support PageSize::Size2M
    • Walk to the P2 table through the P3 entry, replace the target P2 entry with a huge-page PTE
    • Free the old P1 subtree with dealloc_tree(p1table_paddr, M::LEVELS - 1)
  • Reject non-huge page sizes: log an error and return PagingError::NotAligned
  • Conservatively set self.flush = ToFlush::Full since a whole huge-page range is modified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant