Definitions in vdev-core.h

Preprocessor macro definitions for the vdev-core.h header file

Definitions:

#include <qvm/vdev-core.h>
#define QVM_OPTION_NO_ARG_PREFIX "0"

This value is used as a prefix on a vdev option list entry to indicate that it takes no following argument.

#define VDEV_CTRL_OPTIONS_START 0u

This value is passed to the control function to initialize vdev state. The vdev_factory structure's control callback arg argument is NULL.

#define VDEV_CTRL_OPTIONS_END 1u

This value is passed to the control function to finalize vdev state after option processing. The vdev_factory structure's control callback arg argument is NULL.

#define VDEV_CTRL_GUEST_CONFIGURED 2u

This value is passed to the control function after the VM is fully configured. The vdev_factory structure's control callback arg argument is NULL.

#define VDEV_CTRL_BOOTUP (VDEV_CTRL_GUEST_CONFIGURED)

Defined for source compatibility.

#define VDEV_CTRL_TERMINATE 3u

This value is passed to the control function to indicate that the container process is terminating. The vdev_factory structure's control callback arg argument is NULL.

#define VDEV_CTRL_STATUS 4u

This value is passed to the control function to make the vdev output status information. The vdev_factory structure's control callback arg argument is NULL.

#define VDEV_CTRL_GEN_ACPI 5u

This value is passed to the control function to generate ACPI information for the vdev. The vdev_factory structure's control callback arg argument is NULL.

#define VDEV_CTRL_GEN_FDT 6u

This value is passed to the control function to generate FDT information for the vdev. The vdev_factory structure's control callback arg argument should be interpreted as an integer, which identifies the root node for vdevs in the FDT.

#define VDEV_CTRL_BUTTON 7u

In a QNX hypervisor system, sending SIGTERM or SIGINT to a qvm process instance simulates the pressing of the power button. This value is passed to the control function to simulate a request for a graceful shutdown. The vdev_factory structure's control callback arg argument is NULL.

#define VDEV_CTRL_PCI_BARS 8u

This value is passed to the control function to list the base address registers (BARs) of the PCI vdev. Any positive return value means no BARs are exposed by the vdev. The negation of a negative return value is the number of BARs exposed by the vdev (e.g., a return of -6 means the vdev has exposed 6 BARs). The vdev_factory structure's control callback arg argument is of type struct vpci_bar; you must provide qvm with a pointer to your vpci_bar objects. For more information, see the Virtual Device Developer's Guide.

#define VDEV_CTRL_ASSIGN 9u

This value is passed to the control function to let the vdev automatically assign resources. This occurs after all options have been processed. The vdev_factory structure's control callback arg argument should be interpreted as an integer, containing a bitset of vdev_ctrl_assign_flags values.

#define VDEV_CTRL_GUEST_STARTING 10u

This value is passed to the control function to indicate that the hosting qvm process instance is ready to invoke the guest run code. The vdev_factory structure's control callback arg argument is a pointer to the guest boot vCPU structure. This exists because a vdev can make changes to the boot environment, and hence may need to change the information needed to boot.

#define VDEV_CTRL_FIRST_OPTIDX 16u

This value is passed to the control function to handle device-specific option n when it is passed VDEV_CTRL_FIRST_OPTIDX + n. If when parsing the configuration the qvm process instance encounters an option that has been specified in the option list for the vdev's vdev_factory structure, the qvm process invokes the vdev_factory structure's control function with the ctrl argument set to VDEV_CTRL_FIRST_OPTIDX + n, where n is the index to the option in the vdev_factory structure's option_list array. If the option takes an argument, the vdev_factory structure's control callback arg argument is the next entry in the configuration.