Flags controlling vdev creation
#include <qvm/vdev-core.h>
enum vdev_factory_flags { VFF_NONE = 0x0000, VFF_RESERVED = 0x0001, VFF_INTR_NO = 0x0002, VFF_INTR_REQ = 0x0004, VFF_INTR_NONPCI = 0x0008, VFF_LOC_NO = 0x0010, VFF_VDEV_MEM = 0x0020, VFF_VDEV_X86_IO = 0x0040, VFF_VDEV_PCI = 0x0080, VFF_VDEV_LOC_TYPES = (VFF_VDEV_MEM|VFF_VDEV_X86_IO|VFF_VDEV_PCI), VFF_MUTEX = 0x0100, VFF_MUTEX_RECURSIVE = 0x0200, VFF_RC = 0x0400, VFF_MANUAL_REGION = 0x0800 };
No flags specified.
Reserved for internal use.
The intr option isn't allowed
The intr option is required.
The intr option is required for non-PCI devices.
The loc option isn't allowed.
The vdev is allowed to be a mem: device. The loc option can be mem
The vdev is allowed to be an io: device on an x86 hardware platform.
The vdev is allowed to be a PCI device.
Set of allowed location types. For internal use.
The device needs a mutex.
The mutex must be recursive
The vdev can be remotely controlled Reserved for future use.
The vdev handles the region creation; the qvm process will not automatically create the region. If this isn't specified, the qvm process instance automatically creates the region when it finishes creating the vdev.
These flags are used for the vdev_factory factory_flags member.
The two mutex flags cause the qvm process to initialize the vdev_t structure's v_mtx member. If you need a recursive mutex, then you must specify both BOTH VFF_MUTEX and VFF_MUTEX_RECURSIVE.
There are four states for interrupts. You can set any of the three bits: VFF_INTR_NO, VFF_INTR_REQ or VFF_INTR_NONPCI. If you don't set any of these three bits is set, then you can have the interrupt automatically assigned in VDEV_CTRL_ASSIGN.
Similarly, You can assign any of the three bits: VFF_VDEV_MEM, VFF_VDEV_X86_IO or VFF_VDEV_PCI. If you don't set any of these three bits is set, then you can have the location automatically assigned in VDEV_CTRL_ASSIGN. If the location flags are set, then the hosting qvm process instance checks that the assigned location is of the specifed type.
If a location is assigned but no location type is specifed, then the hosting qvm process instance checks assumes the default location type and checks that the assigned location is of this type. Note that you can use VDEV_CTRL_ASSIGN only if you don't assign the location.