Expand description
A Linux x86-64 userland environment on top of the qcode_vm emulator.
The crate loads a static ELF executable into the VM’s MMU, builds the SysV initial process stack, and services Linux system calls on the host.
§How a system call reaches the host
The x86-64 syscall instruction lifts, in the SLEIGH x86 specification, to
a user-defined p-code operation (define pcodeop syscall). The QCode
emulator has no semantics for it and the VM stops with
VmExit::Interrupt, the machine positioned
at the operation with everything before it retired. The environment
services the call and resumes with Vm::resume.
See process for the exact rule.
§Layout
Re-exports§
pub use process::Config;pub use process::Crash;pub use process::Process;pub use process::ProcessExit;
Modules§
- errno
- Linux error numbers, and the
-errnoreturn convention. - fs
- The file-descriptor table, and the host filesystem behind it.
- guest
- Guest-memory accessors: every copy between the host and the guest goes
through the MMU, and a failed access surfaces as
EFAULTrather than a crash of the environment. - loader
- Places a static ELF64 x86-64 executable into guest memory.
- process
- The run loop: a loaded image, a machine, and the host services behind it.
- regs
- Register access that does not go through the emulator’s name lookup.
- stack
- The SysV x86-64 initial process stack.
- syscall
- The Linux x86-64 system call dispatcher.