-
Notifications
You must be signed in to change notification settings - Fork 133
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
Decouple instructions into a separate feature flag. #179
Conversation
I'm also not sure why the workflows failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! Looks good to me overall, except for a few minor things (see my inline comments).
The CI failures happened because yesterday's Rust nightly was broken. I just restarted the checks and it seems like it's now working again. There is still a small CI error because one check tries to enable the stable
feature, which no longer exists. To fix this, you need to update the check command in .github/workflows/build.yml
.
Regarding the const-ness of |
Final nail in the coffin is the addr module, which is dependent on by the OffsetPageTable. Lots of functions are marked for only 64-bit pointer width, and that is very fair - lots of silent trunction errors can lead to the oddest of behaviours. I am wondering, however, if it wouldn't make sense to allow to work with 64-bit addresses on 32-bit machines? At the last From what I can tell there are 2 options to go about the issue - either mark OffsetPageTable as a structure that depends on 64-bit pointer width, or making the addresses function on non-64-bit architectures. Of course, there can be a third solution, but I don't see it right now. Please tell me what you think about it. And how should I proceed? |
I don't think that that panicking at runtime is a good idea. People can use the
The
So I think this is the way to go. |
…nstructions feature (required by flush)
Alright, I added a pointer width check. The macos testing seems to have failed due to lld missing (I think we had similar issue a few days back on our CI as well), but overall the code seems to be somewhat ready from my end. If there are any additional changes needed, please let me know! |
Thanks a lot, looks very good! I left two more inline comments above, maybe you could look into them? Otherwise I think this should be ready for merging. The |
Alright, I added in the requested PageTable change, and clarified the decision made in the build script. I hope it is all fine! |
Looks good to me, thanks! I'll probably wait until the macOS nightly is fixed until merging, to ensure that everything works there as well. I hope that this will happen in the next few days. |
Published as v0.12.0. |
This would implement what was proposed in #177.
There is one issue, however - array_init dependency. The crate currently does not compile with no features on. From what I could tell, the dep is only used in
PageTable::new
, and it very well could be dropped, by replacingPageTable::new
with an identical implementation as the const variant, just kept as non-const. However, I did not implement this change, as I didn't know if there was something else at play that needed the function to be the way it is. If this change would be fine, I can go ahead and add it in this PR.Other than that, if there are any other changes that may need to be implemented, please let me know!
Edit(phil-opp): This is a breaking change.