Skip to content

Page Table Visitors #121

Open
Open
@mark-i-m

Description

@mark-i-m

We previously had some discussion of using some sort of Visitor pattern to visit and update page tables. I got some time to play around with it a bit today. I think it is promising, but there are some unresolved API questions and some issues that I don't know how to deal with.

Unresolved Problem:

  • The visitor doesn't know where in virtual memory a page table is. We need some generic and ergonomic way to figure out this information for Visitors to really work. For now, I have left it abstracted as the Visit::get_page method, which is implemented by each Visitor as needed.

Unresolved questions:

  • Should we have visit_huge_page<S: Size>(...)? Is this too fine-grained?

Here is a rough prototype. It doesn't work or compile, but it should give a rough idea: https://github.com/rust-osdev/x86_64/compare/master...mark-i-m:visitor?expand=1

cc #32 #96 #112 #113 #114

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions