-
Notifications
You must be signed in to change notification settings - Fork 61
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
x86 registers definition #62
Comments
Hi, Thanks for your interest in x86. I think that it would be possible to provide such a struct that essentially captures the CPU register state. |
Hi @gz,
I think the official term is I have 3 questions:
Thanks ! |
Hi @Wenzel, Alright, so it looks like we could try to aggregate all these according to the SDM.
Currently the x86 crate only compiles on x86 (32 bit and 64bit). There is no reason why it couldn't be made to compile (at least the struct definitions) for ARM based processors. But it will require to exclude all x86 specific functions from the compilation unit (by using cfg! annotations). I'd be ok with such an addition if it serves some benefit.
The rust way would also be to have an enum:
and then do pattern matching on that Registers enum.
No, it seems to me that x86_64 was a hard-fork of this crate. I don't know about the intentions of crate x86-64 but it looks like it's more about trying to provide a safe interface for programming x86 hardware, whereas this crate is trying to provide a no-abstraction/unsafe interface to program x86 and leaves the decisions on how to make it safe to the user of the library. |
For 32 bit x86 there is a standard order specified by the pusha instruction: |
Hi !
I'm considering using your crate to use a "standard" definition of x86 registers in my project.
My goal is to do Virtual Machine Introspection (VMI), and I would like to read the registers of a VM on Xen, KVM or VirtualBox with a Rust API (libmicrovmi)
I looked at your docs, but I couldn't find a structure that would define the x86 registers.
There is indeed a module that defines the MSR constants, but what I would like is a structure that would contains all x86 standard registers.
For example on the Libvmi (C) library:
Can you add such a structure to provide a standard definition of x86 registers in a crate ?
What do you think ?
Thank you for this crate !
The text was updated successfully, but these errors were encountered: