Expand description
A safe wrapper around the kernel’s KVM interface.
New code should use the hypervisor crate instead.
Modules§
- cap 🔒
Structs§
- A structure with the same layout as
kvm_ioapic_statebut without the union, making it zerocopy-able. - A single route for an IRQ.
- A wrapper around opening and using
/dev/kvm. - MemSlot 🔒
- A Vcpu that has a thread and can be run. Created by calling
to_runnableon aVcpu. ImplementsDerefto aVcpuso allVcpumethods are usable, with the addition of therunfunction to execute the guest. - A wrapper around creating and using a VCPU.
Vcpuprovides all functionality except for running. To run,to_runnablemust be called to lock the vcpu to a thread. Then the returnedRunnableVcpucan be used for running. - A wrapper around creating and using a VM.
Enums§
- A capability the kernel’s KVM interface can possibly expose.
- Used in
Vm::register_ioeventto indicate a size and optionally value to match. - An address either in programmable I/O space or in memory mapped I/O space.
- A source of IRQs in an
IrqRoute. - Interrupt controller IDs
- A reason why a VCPU exited. One of these returns every time
Vcpu::runis called.
Constants§
- Number of pins on the IOAPIC.
Functions§
- Helper function to determine the size in bytes of a dirty log bitmap for the given memory region size.
Type Aliases§
- Wrapper for kvm_cpuid2 which has a zero length array at the end. Hides the zero length array behind a bounds check.