Updated: October 28, 2024 |
Obtain a system-wide unique number
#include <qvm/utils.h>
uint64_t qvm_unique(uint64_t start, uint64_t end)
The obtained number is unique in the entire hypervisor system. This function is useful when working with resources (e.g., a hardware device) that may be shared across multiple qvm process instances. To be able to provide a number that is unique in the entire hypervisor system, this function must access resources beyond the bounds of its VM.
The unique number for the system, or QVM_UNIQUE_FAILED if no number was obtained.