[PATCH 2/9] qapi/misc: Move add_client command with chardev code

Philippe Mathieu-Daudé posted 9 patches 5 years, 11 months ago
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ben Warren <ben@skyportsystems.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Kevin Wolf <kwolf@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Ronnie Sahlberg <ronniesahlberg@gmail.com>, Eric Blake <eblake@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Lieven <pl@kamp.de>, Max Reitz <mreitz@redhat.com>, Markus Armbruster <armbru@redhat.com>, Richard Henderson <rth@twiddle.net>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
There is a newer version of this series
[PATCH 2/9] qapi/misc: Move add_client command with chardev code
Posted by Philippe Mathieu-Daudé 5 years, 11 months ago
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qapi/char.json     | 32 ++++++++++++++++++++++++++++++++
 qapi/misc.json     | 32 --------------------------------
 monitor/qmp-cmds.c |  1 +
 3 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/qapi/char.json b/qapi/char.json
index 6907b2bfdb..8b7baf11eb 100644
--- a/qapi/char.json
+++ b/qapi/char.json
@@ -572,3 +572,35 @@
 { 'event': 'VSERPORT_CHANGE',
   'data': { 'id': 'str',
             'open': 'bool' } }
+
+##
+# @add_client:
+#
+# Allow client connections for VNC, Spice and socket based
+# character devices to be passed in to QEMU via SCM_RIGHTS.
+#
+# @protocol: protocol name. Valid names are "vnc", "spice" or the
+#            name of a character device (eg. from -chardev id=XXXX)
+#
+# @fdname: file descriptor name previously passed via 'getfd' command
+#
+# @skipauth: whether to skip authentication. Only applies
+#            to "vnc" and "spice" protocols
+#
+# @tls: whether to perform TLS. Only applies to the "spice"
+#       protocol
+#
+# Returns: nothing on success.
+#
+# Since: 0.14.0
+#
+# Example:
+#
+# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
+#                                              "fdname": "myclient" } }
+# <- { "return": {} }
+#
+##
+{ 'command': 'add_client',
+  'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
+            '*tls': 'bool' } }
diff --git a/qapi/misc.json b/qapi/misc.json
index c18fe681fb..e84e6823e9 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -39,38 +39,6 @@
 { 'enum': 'LostTickPolicy',
   'data': ['discard', 'delay', 'slew' ] }
 
-##
-# @add_client:
-#
-# Allow client connections for VNC, Spice and socket based
-# character devices to be passed in to QEMU via SCM_RIGHTS.
-#
-# @protocol: protocol name. Valid names are "vnc", "spice" or the
-#            name of a character device (eg. from -chardev id=XXXX)
-#
-# @fdname: file descriptor name previously passed via 'getfd' command
-#
-# @skipauth: whether to skip authentication. Only applies
-#            to "vnc" and "spice" protocols
-#
-# @tls: whether to perform TLS. Only applies to the "spice"
-#       protocol
-#
-# Returns: nothing on success.
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
-#                                              "fdname": "myclient" } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'add_client',
-  'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
-            '*tls': 'bool' } }
-
 ##
 # @NameInfo:
 #
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index 864cbfa32e..67d95b4af7 100644
--- a/monitor/qmp-cmds.c
+++ b/monitor/qmp-cmds.c
@@ -31,6 +31,7 @@
 #include "sysemu/block-backend.h"
 #include "qapi/error.h"
 #include "qapi/qapi-commands-block.h"
+#include "qapi/qapi-commands-char.h"
 #include "qapi/qapi-commands-control.h"
 #include "qapi/qapi-commands-machine.h"
 #include "qapi/qapi-commands-misc.h"
-- 
2.21.1


Re: [PATCH 2/9] qapi/misc: Move add_client command with chardev code
Posted by Marc-André Lureau 5 years, 11 months ago
Hi

On Fri, Mar 13, 2020 at 7:42 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Without looking at the rest of the series, I fail to see the
improvement, quite the opposite. A bit of context?

> ---
>  qapi/char.json     | 32 ++++++++++++++++++++++++++++++++
>  qapi/misc.json     | 32 --------------------------------
>  monitor/qmp-cmds.c |  1 +
>  3 files changed, 33 insertions(+), 32 deletions(-)
>
> diff --git a/qapi/char.json b/qapi/char.json
> index 6907b2bfdb..8b7baf11eb 100644
> --- a/qapi/char.json
> +++ b/qapi/char.json
> @@ -572,3 +572,35 @@
>  { 'event': 'VSERPORT_CHANGE',
>    'data': { 'id': 'str',
>              'open': 'bool' } }
> +
> +##
> +# @add_client:
> +#
> +# Allow client connections for VNC, Spice and socket based
> +# character devices to be passed in to QEMU via SCM_RIGHTS.
> +#
> +# @protocol: protocol name. Valid names are "vnc", "spice" or the
> +#            name of a character device (eg. from -chardev id=XXXX)
> +#
> +# @fdname: file descriptor name previously passed via 'getfd' command
> +#
> +# @skipauth: whether to skip authentication. Only applies
> +#            to "vnc" and "spice" protocols
> +#
> +# @tls: whether to perform TLS. Only applies to the "spice"
> +#       protocol
> +#
> +# Returns: nothing on success.
> +#
> +# Since: 0.14.0
> +#
> +# Example:
> +#
> +# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
> +#                                              "fdname": "myclient" } }
> +# <- { "return": {} }
> +#
> +##
> +{ 'command': 'add_client',
> +  'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
> +            '*tls': 'bool' } }
> diff --git a/qapi/misc.json b/qapi/misc.json
> index c18fe681fb..e84e6823e9 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -39,38 +39,6 @@
>  { 'enum': 'LostTickPolicy',
>    'data': ['discard', 'delay', 'slew' ] }
>
> -##
> -# @add_client:
> -#
> -# Allow client connections for VNC, Spice and socket based
> -# character devices to be passed in to QEMU via SCM_RIGHTS.
> -#
> -# @protocol: protocol name. Valid names are "vnc", "spice" or the
> -#            name of a character device (eg. from -chardev id=XXXX)
> -#
> -# @fdname: file descriptor name previously passed via 'getfd' command
> -#
> -# @skipauth: whether to skip authentication. Only applies
> -#            to "vnc" and "spice" protocols
> -#
> -# @tls: whether to perform TLS. Only applies to the "spice"
> -#       protocol
> -#
> -# Returns: nothing on success.
> -#
> -# Since: 0.14.0
> -#
> -# Example:
> -#
> -# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
> -#                                              "fdname": "myclient" } }
> -# <- { "return": {} }
> -#
> -##
> -{ 'command': 'add_client',
> -  'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
> -            '*tls': 'bool' } }
> -
>  ##
>  # @NameInfo:
>  #
> diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
> index 864cbfa32e..67d95b4af7 100644
> --- a/monitor/qmp-cmds.c
> +++ b/monitor/qmp-cmds.c
> @@ -31,6 +31,7 @@
>  #include "sysemu/block-backend.h"
>  #include "qapi/error.h"
>  #include "qapi/qapi-commands-block.h"
> +#include "qapi/qapi-commands-char.h"
>  #include "qapi/qapi-commands-control.h"
>  #include "qapi/qapi-commands-machine.h"
>  #include "qapi/qapi-commands-misc.h"
> --
> 2.21.1
>


Re: [PATCH 2/9] qapi/misc: Move add_client command with chardev code
Posted by Philippe Mathieu-Daudé 5 years, 11 months ago
On 3/14/20 1:23 AM, Marc-André Lureau wrote:
> Hi
> 
> On Fri, Mar 13, 2020 at 7:42 PM Philippe Mathieu-Daudé
> <philmd@redhat.com> wrote:
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Without looking at the rest of the series, I fail to see the
> improvement, quite the opposite. A bit of context?


You are right this not needed. I guess remember I had a linker failure 
at some point while working on this series but I then take some patches 
out while rebasing, so it might be the result of an earlier incorrect patch.

> 
>> ---
>>   qapi/char.json     | 32 ++++++++++++++++++++++++++++++++
>>   qapi/misc.json     | 32 --------------------------------
>>   monitor/qmp-cmds.c |  1 +
>>   3 files changed, 33 insertions(+), 32 deletions(-)
>>
>> diff --git a/qapi/char.json b/qapi/char.json
>> index 6907b2bfdb..8b7baf11eb 100644
>> --- a/qapi/char.json
>> +++ b/qapi/char.json
>> @@ -572,3 +572,35 @@
>>   { 'event': 'VSERPORT_CHANGE',
>>     'data': { 'id': 'str',
>>               'open': 'bool' } }
>> +
>> +##
>> +# @add_client:
>> +#
>> +# Allow client connections for VNC, Spice and socket based
>> +# character devices to be passed in to QEMU via SCM_RIGHTS.
>> +#
>> +# @protocol: protocol name. Valid names are "vnc", "spice" or the
>> +#            name of a character device (eg. from -chardev id=XXXX)
>> +#
>> +# @fdname: file descriptor name previously passed via 'getfd' command
>> +#
>> +# @skipauth: whether to skip authentication. Only applies
>> +#            to "vnc" and "spice" protocols
>> +#
>> +# @tls: whether to perform TLS. Only applies to the "spice"
>> +#       protocol
>> +#
>> +# Returns: nothing on success.
>> +#
>> +# Since: 0.14.0
>> +#
>> +# Example:
>> +#
>> +# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
>> +#                                              "fdname": "myclient" } }
>> +# <- { "return": {} }
>> +#
>> +##
>> +{ 'command': 'add_client',
>> +  'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
>> +            '*tls': 'bool' } }
>> diff --git a/qapi/misc.json b/qapi/misc.json
>> index c18fe681fb..e84e6823e9 100644
>> --- a/qapi/misc.json
>> +++ b/qapi/misc.json
>> @@ -39,38 +39,6 @@
>>   { 'enum': 'LostTickPolicy',
>>     'data': ['discard', 'delay', 'slew' ] }
>>
>> -##
>> -# @add_client:
>> -#
>> -# Allow client connections for VNC, Spice and socket based
>> -# character devices to be passed in to QEMU via SCM_RIGHTS.
>> -#
>> -# @protocol: protocol name. Valid names are "vnc", "spice" or the
>> -#            name of a character device (eg. from -chardev id=XXXX)
>> -#
>> -# @fdname: file descriptor name previously passed via 'getfd' command
>> -#
>> -# @skipauth: whether to skip authentication. Only applies
>> -#            to "vnc" and "spice" protocols
>> -#
>> -# @tls: whether to perform TLS. Only applies to the "spice"
>> -#       protocol
>> -#
>> -# Returns: nothing on success.
>> -#
>> -# Since: 0.14.0
>> -#
>> -# Example:
>> -#
>> -# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
>> -#                                              "fdname": "myclient" } }
>> -# <- { "return": {} }
>> -#
>> -##
>> -{ 'command': 'add_client',
>> -  'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
>> -            '*tls': 'bool' } }
>> -
>>   ##
>>   # @NameInfo:
>>   #
>> diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
>> index 864cbfa32e..67d95b4af7 100644
>> --- a/monitor/qmp-cmds.c
>> +++ b/monitor/qmp-cmds.c
>> @@ -31,6 +31,7 @@
>>   #include "sysemu/block-backend.h"
>>   #include "qapi/error.h"
>>   #include "qapi/qapi-commands-block.h"
>> +#include "qapi/qapi-commands-char.h"
>>   #include "qapi/qapi-commands-control.h"
>>   #include "qapi/qapi-commands-machine.h"
>>   #include "qapi/qapi-commands-misc.h"
>> --
>> 2.21.1
>>
>