[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5C3D42E1.7030005@intel.com>
Date: Tue, 15 Jan 2019 10:18:09 +0800
From: Wei Wang <wei.w.wang@...el.com>
To: Cornelia Huck <cohuck@...hat.com>,
"Michael S . Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>
CC: virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, virtio-dev@...ts.oasis-open.org,
Halil Pasic <pasic@...ux.ibm.com>
Subject: Re: [virtio-dev] [PATCH 2/2] virtio: document virtio_config_ops restrictions
On 01/04/2019 12:08 AM, Cornelia Huck wrote:
> 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@...hat.com>
> ---
> include/linux/virtio_config.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> 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/@..._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
Reviewed-by: Wei Wang <wei.w.wang@...el.com>
Best,
Wei
Powered by blists - more mailing lists