Skip to content

Commit d1c1dad

Browse files
cohuckmstsirkin
authored andcommitted
virtio: document virtio_config_ops restrictions
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 <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent b89a07c commit d1c1dad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/linux/virtio_config.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ struct irq_affinity;
1212

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

0 commit comments

Comments
 (0)