Skip to content

Commit

Permalink
virtio: document virtio_config_ops restrictions
Browse files Browse the repository at this point in the history
Some transports (e.g. virtio-ccw) implement virtio operations that
seem to be a simple read/write as something more involved that
cannot be done from an atomic context.

Give at least a hint about that.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
Cornelia Huck authored and Michael S. Tsirkin committed Jan 15, 2019
1 parent b89a07c commit d1c1dad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/linux/virtio_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ struct irq_affinity;

/**
* virtio_config_ops - operations for configuring a virtio device
* Note: Do not assume that a transport implements all of the operations
* getting/setting a value as a simple read/write! Generally speaking,
* any of @get/@set, @get_status/@set_status, or @get_features/
* @finalize_features are NOT safe to be called from an atomic
* context.
* @get: read the value of a configuration field
* vdev: the virtio_device
* offset: the offset of the configuration field
Expand Down

0 comments on commit d1c1dad

Please sign in to comment.