aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/virtio_config.h
diff options
context:
space:
mode:
authorCornelia Huck <cohuck@redhat.com>2019-01-03 17:08:04 +0100
committerMichael S. Tsirkin <mst@redhat.com>2019-01-14 20:15:17 -0500
commitd1c1dad89e7a8be2cfdc7b92deca2c8048f0d263 (patch)
treee597a3da2ffd8a936ff932d9e19f74ce9f3653a1 /include/linux/virtio_config.h
parentvirtio: fix virtio_config_ops description (diff)
downloadwireguard-linux-d1c1dad89e7a8be2cfdc7b92deca2c8048f0d263.tar.xz
wireguard-linux-d1c1dad89e7a8be2cfdc7b92deca2c8048f0d263.zip
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 <cohuck@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/virtio_config.h')
-rw-r--r--include/linux/virtio_config.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 7087ef946ba7..987b6491b946 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -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