1. General descriptionΒΆ
The kvm API is a set of ioctls that are issued to control various aspects of a virtual machine. The ioctls belong to three classes:
- System ioctls
These query and set global attributes which affect the whole kvm subsystem. In addition a system ioctl is used to create virtual machines.
- VM ioctls
These query and set attributes that affect an entire virtual machine, for example memory layout. In addition a VM ioctl is used to create virtual cpus (vcpus) and devices.
VM ioctls must be issued from the same process (address space) that was used to create the VM.
- vcpu ioctls
These query and set attributes that control the operation of a single virtual cpu.
vcpu ioctls should be issued from the same thread that was used to create the vcpu, except for asynchronous vcpu ioctl that are marked as such in the documentation. Otherwise, the first ioctl after switching threads could see a performance impact.
- device ioctls
These query and set attributes that control the operation of a single device.
device ioctls must be issued from the same process (address space) that was used to create the VM.