Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
qapi/block-core.json | 30 ++++++++++++++++++++++++++++++
qapi/misc.json | 30 ------------------------------
block/iscsi.c | 2 +-
stubs/uuid.c | 2 +-
4 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 91586fb1fb..5c3fa6c5d0 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -5415,3 +5415,33 @@
{ 'command': 'blockdev-snapshot-delete-internal-sync',
'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
'returns': 'SnapshotInfo' }
+
+##
+# @UuidInfo:
+#
+# Guest UUID information (Universally Unique Identifier).
+#
+# @UUID: the UUID of the guest
+#
+# Since: 0.14.0
+#
+# Notes: If no UUID was specified for the guest, a null UUID is returned.
+##
+{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
+
+##
+# @query-uuid:
+#
+# Query the guest UUID information.
+#
+# Returns: The @UuidInfo for the guest
+#
+# Since: 0.14.0
+#
+# Example:
+#
+# -> { "execute": "query-uuid" }
+# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
+#
+##
+{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
diff --git a/qapi/misc.json b/qapi/misc.json
index ed28e41229..f70025f34c 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -97,36 +97,6 @@
##
{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
-##
-# @UuidInfo:
-#
-# Guest UUID information (Universally Unique Identifier).
-#
-# @UUID: the UUID of the guest
-#
-# Since: 0.14.0
-#
-# Notes: If no UUID was specified for the guest, a null UUID is returned.
-##
-{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
-
-##
-# @query-uuid:
-#
-# Query the guest UUID information.
-#
-# Returns: The @UuidInfo for the guest
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "query-uuid" }
-# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
-#
-##
-{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
-
##
# @IOThreadInfo:
#
diff --git a/block/iscsi.c b/block/iscsi.c
index 682abd8e09..68ed5cf3f8 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -42,7 +42,7 @@
#include "qemu/uuid.h"
#include "sysemu/replay.h"
#include "qapi/error.h"
-#include "qapi/qapi-commands-misc.h"
+#include "qapi/qapi-commands-block-core.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
#include "crypto/secret.h"
diff --git a/stubs/uuid.c b/stubs/uuid.c
index 67f182fa3a..9ef75fdae4 100644
--- a/stubs/uuid.c
+++ b/stubs/uuid.c
@@ -1,5 +1,5 @@
#include "qemu/osdep.h"
-#include "qapi/qapi-commands-misc.h"
+#include "qapi/qapi-commands-block-core.h"
#include "qemu/uuid.h"
UuidInfo *qmp_query_uuid(Error **errp)
--
2.21.1
On Mon, 16 Mar 2020 01:03:44 +0100
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
here should be why
PS:
I don't see a reason to move it to block code at all
if this command is moved then it should be machine code
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> qapi/block-core.json | 30 ++++++++++++++++++++++++++++++
> qapi/misc.json | 30 ------------------------------
> block/iscsi.c | 2 +-
> stubs/uuid.c | 2 +-
> 4 files changed, 32 insertions(+), 32 deletions(-)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 91586fb1fb..5c3fa6c5d0 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -5415,3 +5415,33 @@
> { 'command': 'blockdev-snapshot-delete-internal-sync',
> 'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
> 'returns': 'SnapshotInfo' }
> +
> +##
> +# @UuidInfo:
> +#
> +# Guest UUID information (Universally Unique Identifier).
> +#
> +# @UUID: the UUID of the guest
> +#
> +# Since: 0.14.0
> +#
> +# Notes: If no UUID was specified for the guest, a null UUID is returned.
> +##
> +{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
> +
> +##
> +# @query-uuid:
> +#
> +# Query the guest UUID information.
> +#
> +# Returns: The @UuidInfo for the guest
> +#
> +# Since: 0.14.0
> +#
> +# Example:
> +#
> +# -> { "execute": "query-uuid" }
> +# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
> +#
> +##
> +{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
> diff --git a/qapi/misc.json b/qapi/misc.json
> index ed28e41229..f70025f34c 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -97,36 +97,6 @@
> ##
> { 'command': 'query-kvm', 'returns': 'KvmInfo' }
>
> -##
> -# @UuidInfo:
> -#
> -# Guest UUID information (Universally Unique Identifier).
> -#
> -# @UUID: the UUID of the guest
> -#
> -# Since: 0.14.0
> -#
> -# Notes: If no UUID was specified for the guest, a null UUID is returned.
> -##
> -{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
> -
> -##
> -# @query-uuid:
> -#
> -# Query the guest UUID information.
> -#
> -# Returns: The @UuidInfo for the guest
> -#
> -# Since: 0.14.0
> -#
> -# Example:
> -#
> -# -> { "execute": "query-uuid" }
> -# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
> -#
> -##
> -{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
> -
> ##
> # @IOThreadInfo:
> #
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 682abd8e09..68ed5cf3f8 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -42,7 +42,7 @@
> #include "qemu/uuid.h"
> #include "sysemu/replay.h"
> #include "qapi/error.h"
> -#include "qapi/qapi-commands-misc.h"
> +#include "qapi/qapi-commands-block-core.h"
> #include "qapi/qmp/qdict.h"
> #include "qapi/qmp/qstring.h"
> #include "crypto/secret.h"
> diff --git a/stubs/uuid.c b/stubs/uuid.c
> index 67f182fa3a..9ef75fdae4 100644
> --- a/stubs/uuid.c
> +++ b/stubs/uuid.c
> @@ -1,5 +1,5 @@
> #include "qemu/osdep.h"
> -#include "qapi/qapi-commands-misc.h"
> +#include "qapi/qapi-commands-block-core.h"
> #include "qemu/uuid.h"
>
> UuidInfo *qmp_query_uuid(Error **errp)
On 3/16/20 2:09 PM, Igor Mammedov wrote:
> On Mon, 16 Mar 2020 01:03:44 +0100
> Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> here should be why
Indeed.
Daniel explained on IRC the GUID structure is "standardized by microsoft
as a way to detect when a guest has certain operations applied" to a
saved snapshot.
https://docs.microsoft.com/en-us/windows/win32/hyperv_v2/virtual-machine-generation-identifier
>
> PS:
> I don't see a reason to move it to block code at all
> if this command is moved then it should be machine code
I guess I mixed GUID with UUID (classic identifier shown in SMBIOS)...
The one I wanted to move to qapi/block-core.json is:
##
# @GuidInfo:
#
# GUID information.
#
# @guid: the globally unique identifier
#
# Since: 2.9
##
{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
##
# @query-vm-generation-id:
#
# Show Virtual Machine Generation ID
#
# Since: 2.9
##
{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
So this one goes to qapi/machine.json... Thanks Igor!
>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> qapi/block-core.json | 30 ++++++++++++++++++++++++++++++
>> qapi/misc.json | 30 ------------------------------
>> block/iscsi.c | 2 +-
>> stubs/uuid.c | 2 +-
>> 4 files changed, 32 insertions(+), 32 deletions(-)
>>
>> diff --git a/qapi/block-core.json b/qapi/block-core.json
>> index 91586fb1fb..5c3fa6c5d0 100644
>> --- a/qapi/block-core.json
>> +++ b/qapi/block-core.json
>> @@ -5415,3 +5415,33 @@
>> { 'command': 'blockdev-snapshot-delete-internal-sync',
>> 'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
>> 'returns': 'SnapshotInfo' }
>> +
>> +##
>> +# @UuidInfo:
>> +#
>> +# Guest UUID information (Universally Unique Identifier).
>> +#
>> +# @UUID: the UUID of the guest
>> +#
>> +# Since: 0.14.0
>> +#
>> +# Notes: If no UUID was specified for the guest, a null UUID is returned.
>> +##
>> +{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
>> +
>> +##
>> +# @query-uuid:
>> +#
>> +# Query the guest UUID information.
>> +#
>> +# Returns: The @UuidInfo for the guest
>> +#
>> +# Since: 0.14.0
>> +#
>> +# Example:
>> +#
>> +# -> { "execute": "query-uuid" }
>> +# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
>> +#
>> +##
>> +{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
>> diff --git a/qapi/misc.json b/qapi/misc.json
>> index ed28e41229..f70025f34c 100644
>> --- a/qapi/misc.json
>> +++ b/qapi/misc.json
>> @@ -97,36 +97,6 @@
>> ##
>> { 'command': 'query-kvm', 'returns': 'KvmInfo' }
>>
>> -##
>> -# @UuidInfo:
>> -#
>> -# Guest UUID information (Universally Unique Identifier).
>> -#
>> -# @UUID: the UUID of the guest
>> -#
>> -# Since: 0.14.0
>> -#
>> -# Notes: If no UUID was specified for the guest, a null UUID is returned.
>> -##
>> -{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
>> -
>> -##
>> -# @query-uuid:
>> -#
>> -# Query the guest UUID information.
>> -#
>> -# Returns: The @UuidInfo for the guest
>> -#
>> -# Since: 0.14.0
>> -#
>> -# Example:
>> -#
>> -# -> { "execute": "query-uuid" }
>> -# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
>> -#
>> -##
>> -{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
>> -
>> ##
>> # @IOThreadInfo:
>> #
>> diff --git a/block/iscsi.c b/block/iscsi.c
>> index 682abd8e09..68ed5cf3f8 100644
>> --- a/block/iscsi.c
>> +++ b/block/iscsi.c
>> @@ -42,7 +42,7 @@
>> #include "qemu/uuid.h"
>> #include "sysemu/replay.h"
>> #include "qapi/error.h"
>> -#include "qapi/qapi-commands-misc.h"
>> +#include "qapi/qapi-commands-block-core.h"
>> #include "qapi/qmp/qdict.h"
>> #include "qapi/qmp/qstring.h"
>> #include "crypto/secret.h"
>> diff --git a/stubs/uuid.c b/stubs/uuid.c
>> index 67f182fa3a..9ef75fdae4 100644
>> --- a/stubs/uuid.c
>> +++ b/stubs/uuid.c
>> @@ -1,5 +1,5 @@
>> #include "qemu/osdep.h"
>> -#include "qapi/qapi-commands-misc.h"
>> +#include "qapi/qapi-commands-block-core.h"
>> #include "qemu/uuid.h"
>>
>> UuidInfo *qmp_query_uuid(Error **errp)
>
© 2016 - 2026 Red Hat, Inc.