guest_intr_assign_type

Interrupt types

Synopsis:

#include <qvm/types.h>
enum guest_intr_assign_type {
    GIAT_UNUSED,
    GIAT_SHAREABLE,
    GIAT_RESERVED,
    GIAT_EXCLUSIVE,
    GIAT_SPECIAL
};

Data:

GIAT_UNUSED

The interrupt is available for automatic assignment.

GIAT_SHAREABLE

The interrupt has been assigned, but is also available for automatic assignment.

GIAT_RESERVED

The interrupt can't be automatically assigned, but can be explicitly assigned through the user-specified configuration (e.g., a *_conf file).

GIAT_EXCLUSIVE

The interrupt has been explicitly assigned through the user-specified configuration, and can't be shared.

GIAT_SPECIAL

The interrupt can't be referenced in the user-specified configuration.

Library:

Provided by qvm; no external library is required.

Description:

The order of these constants is important. An interrupt is allowed to change type upwards, (e.g., SHARABLE may be become EXCLUSIVE), but not downwards (e.g., RESERVED may not become SHAREABLE).

These values are used in the guest_intr_assign() function type parameter. Note that these values describe both the type of assignment you want for a interrupt pin, and the state of the pin.

If your vdev needs to explicitly connect to a PIC rather than let the qvm process instance assign interrupts for it, then your vdev needs to call guest_intr_assign() to specify the interrupt and its type. This is typically needed if your vdev has more than one interrupt line.

In the vdev factory, you can set a flag requiring that the intr option be specified for the vdev (see the Virtual Device Developer's Guide).