-
Notifications
You must be signed in to change notification settings - Fork 137
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
fork() types #72
Comments
Is only |
It is all unstable features. |
Ok, then a nightly/stable split might make more sense than a raw type/accessing registers split. For example, the InterruptDesriptorTable struct uses the unstable x86-interrupt ABI. To implement this split, we could add a cargo feature named |
I'm still not sure this really accomplishes what I would want. The problem is that this crate is a mix of two things: x86_64 types and x86_64 instructions. In the case of a hypervisor, we only need the types. Likewise, the instructions depend on the types. But I don't really want the hypervisor to depend on the instructions. |
Good point. I guess splitting off a "x86_64_types" crate might be the best solution then. Which types do you propose to move out? |
Good question. Definitely I'd also like all of the tables. But that brings up an interesting point: the contents of your table structs are private. That would probably have to change. I also like the |
|
Sounds good! I would be more than happy to collaborate with you! How about we start by creating a |
Yeah, that sounds great. We can start by just moving existing types and go from there. |
In principle yes, but I would prefer to introduce a new type for that. The reason is that we use *Addr in some
Great! I created the repository at https://github.com/rust-osdev/x86_64_types. I invited you to the organization and gave you admin access to the repo. I also published a initial version to crates.io to claim the name. You should have publish access too. |
I put in a MIT/Apache2 license and created some branch protection rules for master (require pull requests and at least 1 approving review), I hope that's fine with you. |
License is perfect. I'm going to start filing pull requests for moving the types. |
Great! |
How stabilized is this crate currently? Here's a thought... Once we move out all the register types, it might make sense to implement read/write of those registers as a trait. We could probably even macroize it. Also, for RFlags, it might be nice to implement some helper methods for getting/settings the iopl. |
We're still in the Adding a trait sounds good in principle. I'm not sure what macros you have in mind, but I'm always a bit reluctant to adding user-facing macros because they are new thing that users of the library have to learn.
Sure, adding functionality is fine with me. I didn't looked into the details of RFLAGS right now, but if it works it should be fine to add. |
Cross-linking pull requests #73 and #74, which contain an initial implementation. @npmccallum What's the state of this? Are you still interested is these changes? |
Yes, I'm still interested. The state is just me being too busy. Let me resubmit against the dev branch today. |
Ok perfect, thanks! No need to hurry! |
Any progress here @npmccallum ? 😉 |
@haraldh Typing on it as we speak! |
I'm working on a KVM library and I find myself reimplementing most of the types from this crate. I can't use this crate, however, because of your (legitimate) need for
asm!()
. Would this project consider merging a patch that splits this crate into two halves: one containing raw types (such asRFlags
) and the other containing implementations for things like reading and writing the registers?The text was updated successfully, but these errors were encountered: