kvm-ioctls

Crates.iokvm-ioctls
lib.rskvm-ioctls
version0.19.0
sourcesrc
created_at2019-02-28 13:36:45.596586
updated_at2024-10-23 08:57:10.350663
descriptionSafe wrappers over KVM ioctls
homepage
repositoryhttps://github.com/rust-vmm/kvm-ioctls
max_upload_size
id117775
size352,078
Laura Loghin (lauralt)

documentation

README

Build Status crates.io

kvm-ioctls

The kvm-ioctls crate provides safe wrappers over the KVM API, a set of ioctls used for creating and configuring Virtual Machines (VMs) on Linux. The ioctls are accessible through four structures:

  • Kvm - wrappers over system ioctls
  • VmFd - wrappers over VM ioctls
  • VcpuFd - wrappers over vCPU ioctls
  • DeviceFd - wrappers over device ioctls

For further details check the KVM API as well as the code documentation.

Supported Platforms

The kvm-ioctls can be used on x86_64, aarch64 and riscv64 (experimental).

Running the tests

Our Continuous Integration (CI) pipeline is implemented on top of Buildkite. For the complete list of tests, check our CI pipeline.

Each individual test runs in a container. To reproduce a test locally, you can use the dev-container on x86_64, arm64 and riscv64.

# For running riscv64 tests, replace v47 with v47-riscv. This provides an
# emulated riscv64 environment on a x86_64 host.
docker run --device=/dev/kvm \
           -it \
           --security-opt seccomp=unconfined \
           --volume $(pwd)/kvm-ioctls:/kvm-ioctls \
           rustvmm/dev:v47
cd kvm-ioctls/
cargo test

For more details about the integration tests that are run for kvm-ioctls, check the rust-vmm-ci readme.

Commit count: 327

cargo fmt