Open zpzigi754 opened 3 months ago
I fully understand your motivation. However, level managment seems to be more of PageTable's role rather than Entry's. Could you come up with another approach?
Should we look at how other Rust-based OS projects deal with page table management, in the context of 1) using a minimal number of unsafe keyword, 2) using stable rust as much as possible? That might help to some extent. (Also, I'm curious about how other people do this stuff)
Our code is inspired by https://os.phil-opp.com/page-tables/. With the same motivation behind your question, the projects that I have investigated thus far had simpler configurations, which are different from ours, like with a fixed root level and a predetermined number of root pages.
The purpose of this change is removing
function overriding
(specialization feature) in the page table implementation which prevents us from using astable rust
.Level
trait bound instruct PageTable
, which is the main place forfunction overriding
, has been removed.This PR is just for the reference; it is not aimed to be merged, because it is not the final form of page table I have in mind.
[before]
[after]