1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use ;
use File;
use ;
/// The device type marker for the main KVM file descriptor, typically obtained
/// by opening `/dev/kvm`.
;
pub const KVMIO: ulong = 0xAE;
/// Identifies the version of the KVM API used by the current kernel.
///
/// The stable API always returns version 12. The kernel documentation suggests
/// that applications should always call this and refuse to run if it returns
/// any value other than that; the version number is not expected to change
/// in the future because future API additions will use [`KVM_CHECK_EXTENSION`]
/// instead.
pub const KVM_GET_API_VERSION: =
unsafe ;
/// Create a new virtual machine and obtain the file that represents it.
///
/// The resulting file accepts the `ioctl` requests defined in [`super::vm`].
pub const KVM_CREATE_VM: =
unsafe ;
/// Query whether the KVM subsystem in the current kernel supports a particular
/// extension.
///
/// A result of zero indicates a lack of support while nonzero indicates
/// support. The nonzero value may carry additional meanings for some
/// extensions.
///
/// This is also supported for virtual machine file descriptors, but you must
/// use [`super::vm::KVM_CHECK_EXTENSION`] instead for those.
pub const KVM_CHECK_EXTENSION: =
unsafe ;
/// Returns the size of the shared memory region that will be used to
/// communicate with userspace for each VCPU.
///
/// The [`super::vcpu::KVM_RUN`] ioctl request communicates with userspace via
/// a shared memory region. This ioctl request returns the size of that region.
pub const KVM_GET_VCPU_MMAP_SIZE: =
unsafe ;