[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 04/14] vfio-user: define vfio-user-server object
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v4 04/14] vfio-user: define vfio-user-server object |
Date: |
Thu, 16 Dec 2021 09:33:30 +0000 |
On Wed, Dec 15, 2021 at 10:35:28AM -0500, Jagannathan Raman wrote:
> diff --git a/qapi/qom.json b/qapi/qom.json
> index ccd1167808..6001a9b8f0 100644
> --- a/qapi/qom.json
> +++ b/qapi/qom.json
> @@ -703,6 +703,20 @@
> { 'struct': 'RemoteObjectProperties',
> 'data': { 'fd': 'str', 'devid': 'str' } }
>
> +##
> +# @VfioUserServerProperties:
> +#
> +# Properties for x-vfio-user-server objects.
> +#
> +# @socket: socket to be used by the libvfiouser library
> +#
> +# @device: the id of the device to be emulated at the server
> +#
> +# Since: 6.2
6.2 has been released so the version number needs to be incremented.
> +struct VfuObjectClass {
> + ObjectClass parent_class;
> +
> + unsigned int nr_devs;
> +
> + bool daemon;
I was wondering what this means. auto_shutdown might be a clearer name.
> +static void vfu_object_set_socket(Object *obj, Visitor *v, const char *name,
> + void *opaque, Error **errp)
> +{
> + VfuObject *o = VFU_OBJECT(obj);
> +
> + qapi_free_SocketAddress(o->socket);
> +
> + o->socket = NULL;
> +
> + visit_type_SocketAddress(v, name, &o->socket, errp);
> +
> + if (o->socket->type != SOCKET_ADDRESS_TYPE_UNIX) {
> + qapi_free_SocketAddress(o->socket);
> + o->socket = NULL;
> + error_setg(errp, "vfu: Unsupported socket type - %s",
> + o->socket->u.q_unix.path);
s/o->socket->u.q_unix.path/SocketAddressType_str(o->socket->type)/
signature.asc
Description: PGP signature
- [PATCH v4 11/14] vfio-user: IOMMU support for remote device, (continued)
[PATCH v4 12/14] vfio-user: handle device interrupts, Jagannathan Raman, 2021/12/15
[PATCH v4 13/14] vfio-user: register handlers to facilitate migration, Jagannathan Raman, 2021/12/15
[PATCH v4 14/14] vfio-user: avocado tests for vfio-user, Jagannathan Raman, 2021/12/15
[PATCH v4 04/14] vfio-user: define vfio-user-server object, Jagannathan Raman, 2021/12/15