Crate kvm

source ·
Expand description

A safe wrapper around the kernel’s KVM interface.

New code should use the hypervisor crate instead.

Modules

Structs

  • 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_runnable on a Vcpu. Implements Deref to a Vcpu so all Vcpu methods are usable, with the addition of the run function to execute the guest.
  • A wrapper around creating and using a VCPU. Vcpu provides all functionality except for running. To run, to_runnable must be called to lock the vcpu to a thread. Then the returned RunnableVcpu can 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_ioevent to 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::run is called.

Constants

Functions

Type Definitions

  • Wrapper for kvm_cpuid2 which has a zero length array at the end. Hides the zero length array behind a bounds check.