Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow reading active flags for a PageTable Entry #149

Closed
tscs37 opened this issue Apr 11, 2020 · 5 comments
Closed

Allow reading active flags for a PageTable Entry #149

tscs37 opened this issue Apr 11, 2020 · 5 comments

Comments

@tscs37
Copy link

tscs37 commented Apr 11, 2020

It would be convenient if there is a method to translate a virtual address to the corresping PageTableFlags, this way the interrupt handler can check which flags are set on the entry and handle faults accordingly.

At the moment, the flags are not easily accessible from a pagetable, which makes it hard to debug issues where the active pagetable flags are unclear.

@tscs37 tscs37 changed the title Allow reading present flags for a PageTable Entry Allow reading active flags for a PageTable Entry Apr 11, 2020
@phil-opp
Copy link
Member

Just to ensure that I understand correctly: You propose a Mapper method like the following:

fn flags_for_addr(&self, addr: VirtAddr) -> Option<PageTableFlags> {}

?

@tscs37
Copy link
Author

tscs37 commented Apr 15, 2020

Essentially, yes.

@phil-opp
Copy link
Member

Thanks for clarifying! I agree that such a function would be useful. Perhaps it's also a good idea to provide a general translate method that yields both the mapped physical address and the flags for the mapping. This way, only a single lookup would be required if both information are needed.

@mental32
Copy link
Member

mental32 commented Dec 28, 2020

Triage: Should this issue be closed on account of #207 being merged?

@phil-opp
Copy link
Member

Yes, I think we can close this. Thanks!

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

No branches or pull requests

3 participants