Skip to content

KVM Guest

include/virt/kvm.h View source View on GitHub
bool kvm_detect(void)
source
bool kvm_has_feature(uint32_t feature)
source
err_checked kvm_hypercall4(
    uint64_t nr,
    uint64_t a0,
    uint64_t a1,
    uint64_t a2,
    uint64_t a3,
    uint64_t *out
)
source

Uses vmcall or vmmcall as the CPU vendor requires. ERR_NO_DEV when not running on KVM, returning other errors too.

TODO

Consider error facility