Jagannathan Raman <[email protected]> writes:
> Setup a handler to run vfio-user context. The context is driven by
> messages to the file descriptor associated with it - get the fd for
> the context and hook up the handler with it
>
> Signed-off-by: Elena Ufimtseva <[email protected]>
> Signed-off-by: John G Johnson <[email protected]>
> Signed-off-by: Jagannathan Raman <[email protected]>
> Reviewed-by: Stefan Hajnoczi <[email protected]>
> ---
> qapi/misc.json | 23 ++++++++++
> hw/remote/vfio-user-obj.c | 95 ++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 117 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/misc.json b/qapi/misc.json
> index b83cc39029..f3cc4a4854 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -553,3 +553,26 @@
> ##
> { 'event': 'RTC_CHANGE',
> 'data': { 'offset': 'int', 'qom-path': 'str' } }
> +
> +##
> +# @VFU_CLIENT_HANGUP:
> +#
> +# Emitted when the client of a TYPE_VFIO_USER_SERVER closes the
> +# communication channel
> +#
> +# @id: ID of the TYPE_VFIO_USER_SERVER object
> +#
> +# @device: ID of attached PCI device
Is this the ID set with -device id=... and such?
> +#
> +# Since: 7.1
> +#
> +# Example:
> +#
> +# <- { "event": "VFU_CLIENT_HANGUP",
> +# "data": { "id": "vfu1",
> +# "device": "lsi1" },
> +# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
> +#
> +##
> +{ 'event': 'VFU_CLIENT_HANGUP',
> + 'data': { 'id': 'str', 'device': 'str' } }