/dev/pvbusu
pvbus device unit u file.
Paravirtual device tree root
pvbus0 at mainbus0
#include <sys/types.h>
#include <sys/ioctl.h>
#include <dev/pv/pvvar.h>
pvbus is used on virtual machines that are running on hypervisors. It provides a pseudo-bus for all paravirtual devices that do not attach to a well-known bus like pci(4). The pvbus driver is responsible for detecting the hypervisor interface, checking the capabilities, attaching the paravirtual devices, and providing access to supported information stores.
Kernel-based Virtual Machine
Microsoft Hyper-V
OpenBSD vmm(4)
VMware vSphere Hypervisor and ESXi
Xen VMM
Note that a hypervisor can attempt to emulate other hypervisors, so multiple hypervisor interfaces may be available on the same host.
VMware Tools driver and “guestinfo” information store
pvbus supports ioctl(2) commands to exchange information with the hypervisor interface, as implemented in the hostctl(8) program. Each detected hypervisor interface is available as a character special device file, /dev/pvbus0, /dev/pvbus1, etc. All available commands use the same pvbus_req structure:
struct pvbus_req {
size_t pvr_keylen;
char *pvr_key;
size_t pvr_valuelen;
char *pvr_value;
};
The caller is responsible for attaching character buffers to the pvr_key and pvr_value fields and to set their length in pvr_keylen and pvr_valuelen accordingly. All keys and values are nul-terminated strings.
The following ioctl(2) commands are available:
Read the value from pvr_key and return it in pvr_value. If pvr_valuelen is not enough for the value, the command will fail and errno(2) is set to ERANGE.
Return the type of the attached hypervisor interface as a string in pvr_key; see Supported hypervisors.
Write the new value pvr_value to the key pvr_key. This command requires write permissions on the device file.
/dev/pvbusu
pvbus device unit u file.
24 releases since OpenBSD 5.8; the text changed 4 times.