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

uhyve: don't panic on initial unmap if page is not mapped #1508

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jounathaen
Copy link
Member

I'm reworking the initial page mapping of uhyve to resolve hermit-os/uhyve#426, but the kernel currently expects the first GiB to be mapped and panics otherwise.
In a transition phase, it makes sense to at least not panic if the page is not mapped.

flush.ignore();
match page_table.unmap(page) {
Ok((_frame, flush)) => flush.ignore(),
Err(UnmapError::PageNotMapped) => {} // If it wasn't mapped, that's not an issue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is similar to what we do in paging::unmap. Would it make sense to log this too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so unless you like ~510 lines of info log output on a normal boot.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would not have to use info. But if you don't think a debug or trace is useful, that's fine for me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I don't think it is worth it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a TODO into the comment or will this be tracked in an issue?

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.

Paging: Only map required areas
2 participants