Skip to content

Commit

Permalink
qapi: Restrict query-vm-generation-id command to machine code
Browse files Browse the repository at this point in the history
Only qemu-system-FOO and qemu-storage-daemon provide QMP
monitors, therefore such declarations and definitions are
irrelevant for user-mode emulation.

Restricting the query-vm-generation-id command to machine.json pulls
less QAPI-generated code into user-mode.

Acked-by: Igor Mammedov <[email protected]>
Acked-by: Markus Armbruster <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
[Commit message tweaked]
Signed-off-by: Markus Armbruster <[email protected]>
  • Loading branch information
philmd authored and Markus Armbruster committed Sep 29, 2020
1 parent a83e24b commit db0f08d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion hw/acpi/vmgenid.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/qapi-commands-machine.h"
#include "qemu/module.h"
#include "hw/acpi/acpi.h"
#include "hw/acpi/aml-build.h"
Expand Down
20 changes: 20 additions & 0 deletions qapi/machine.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,26 @@
##
{ 'command': 'query-target', 'returns': 'TargetInfo' }

##
# @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' }

##
# @LostTickPolicy:
#
Expand Down
21 changes: 0 additions & 21 deletions qapi/misc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1479,24 +1479,3 @@
#
##
{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }

##
# @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' }

2 changes: 1 addition & 1 deletion stubs/vmgenid.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/qapi-commands-machine.h"
#include "qapi/qmp/qerror.h"

GuidInfo *qmp_query_vm_generation_id(Error **errp)
Expand Down

0 comments on commit db0f08d

Please sign in to comment.