struct virtio_config_ops { int (*disable_vq_and_reset)(struct virtqueue *vq); int (*enable_vq_after_reset)(struct virtqueue *vq);
};
/* * __virtio_test_bit - helper to test feature bits. For use by transports. * Devices should normally use virtio_has_feature, * which includes more checks. * @vdev: the device * @fbit: the feature bit
*/ staticinlinebool __virtio_test_bit(conststruct virtio_device *vdev, unsignedint fbit)
{ return vdev->features & (1ULL << fbit);
}
/** * __virtio_set_bit - helper to set feature bits. For use by transports. * @vdev: the device * @fbit: the feature bit
*/ staticinlinevoid __virtio_set_bit(struct virtio_device *vdev, unsignedint fbit)
{
vdev->features |= (1ULL << fbit);
}
/** * __virtio_clear_bit - helper to clear feature bits. For use by transports. * @vdev: the device * @fbit: the feature bit
*/ staticinlinevoid __virtio_clear_bit(struct virtio_device *vdev, unsignedint fbit)
{
vdev->features &= ~(1ULL << fbit);
}
/** * virtio_has_dma_quirk - determine whether this device has the DMA quirk * @vdev: the device
*/ staticinlinebool virtio_has_dma_quirk(conststruct virtio_device *vdev)
{ /* * Note the reverse polarity of the quirk feature (compared to most * other features), this is for compatibility with legacy systems.
*/ return !virtio_has_feature(vdev, VIRTIO_F_ACCESS_PLATFORM);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.