qmp: Expose MachineClass::default_ram_id
commitc556600598afc6e90ae52a2e9ce910b8842244c5
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 26 May 2020 08:25:35 +0000 (26 10:25 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Wed, 19 Aug 2020 14:45:21 +0000 (19 10:45 -0400)
tree96fd3f39e9fd52073ad70f0db0c7d01122b9b927
parent0aca03a3f182ca460a4ffa60239e8addb0f3d493
qmp: Expose MachineClass::default_ram_id

If a management application (like Libvirt) want's to preserve
migration ability and switch to '-machine memory-backend' it
needs to set exactly the same RAM id as QEMU would. Since the id
is machine type dependant, expose it under 'query-machines'
result. Some machine types don't have the attribute set (riscv
family for example), therefore the QMP attribute must be
optional.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <9384422f63fe594a54d801f9cb4539b1d2ce9b67.1590481402.git.mprivozn@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
[ehabkost: updated doc to "since 5.2"]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
hw/core/machine-qmp-cmds.c
qapi/machine.json