* [PATCH v2 0/2] qmp: Expose MachineClass::default_ram_id
@ 2020-05-26 8:25 Michal Privoznik
2020-05-26 8:25 ` [PATCH v2 1/2] qapi: Fix comment format for @CpuInstanceProperties Michal Privoznik
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Michal Privoznik @ 2020-05-26 8:25 UTC (permalink / raw)
To: qemu-devel; +Cc: imammedo, ehabkost, armbru
v2 of:
https://lists.nongnu.org/archive/html/qemu-devel/2020-05/msg07103.html
diff to v1:
- in 2/2 I made the default-ram-id optional, because as it turns out,
not every machine type has it set.
Michal Privoznik (2):
qapi: Fix comment format for @CpuInstanceProperties
qmp: Expose MachineClass::default_ram_id
hw/core/machine-qmp-cmds.c | 4 ++++
qapi/machine.json | 8 ++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
--
2.26.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/2] qapi: Fix comment format for @CpuInstanceProperties
2020-05-26 8:25 [PATCH v2 0/2] qmp: Expose MachineClass::default_ram_id Michal Privoznik
@ 2020-05-26 8:25 ` Michal Privoznik
2020-05-26 13:11 ` Igor Mammedov
2020-05-26 8:25 ` [PATCH v2 2/2] qmp: Expose MachineClass::default_ram_id Michal Privoznik
2020-07-27 18:41 ` [PATCH v2 0/2] " Eduardo Habkost
2 siblings, 1 reply; 8+ messages in thread
From: Michal Privoznik @ 2020-05-26 8:25 UTC (permalink / raw)
To: qemu-devel; +Cc: imammedo, ehabkost, armbru
In 176d2cda0de, the @die-id attribute was introduced to
CpuInstanceProperties type. However, it mangled the comment.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
qapi/machine.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/qapi/machine.json b/qapi/machine.json
index ff7b5032e3..39caa1d914 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -824,7 +824,8 @@
# @node-id: NUMA node ID the CPU belongs to
# @socket-id: socket number within node/board the CPU belongs to
# @die-id: die number within node/board the CPU belongs to (Since 4.1)
-# @core-id: core number within die the CPU belongs to# @thread-id: thread number within core the CPU belongs to
+# @core-id: core number within die the CPU belongs to
+# @thread-id: thread number within core the CPU belongs to
#
# Note: currently there are 5 properties that could be present
# but management should be prepared to pass through other
--
2.26.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] qmp: Expose MachineClass::default_ram_id
2020-05-26 8:25 [PATCH v2 0/2] qmp: Expose MachineClass::default_ram_id Michal Privoznik
2020-05-26 8:25 ` [PATCH v2 1/2] qapi: Fix comment format for @CpuInstanceProperties Michal Privoznik
@ 2020-05-26 8:25 ` Michal Privoznik
2020-05-26 13:15 ` Igor Mammedov
2020-05-26 13:17 ` Igor Mammedov
2020-07-27 18:41 ` [PATCH v2 0/2] " Eduardo Habkost
2 siblings, 2 replies; 8+ messages in thread
From: Michal Privoznik @ 2020-05-26 8:25 UTC (permalink / raw)
To: qemu-devel; +Cc: imammedo, ehabkost, armbru
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>
---
hw/core/machine-qmp-cmds.c | 4 ++++
qapi/machine.json | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 2c5da8413d..3e11a740c9 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -238,6 +238,10 @@ MachineInfoList *qmp_query_machines(Error **errp)
info->default_cpu_type = g_strdup(mc->default_cpu_type);
info->has_default_cpu_type = true;
}
+ if (mc->default_ram_id) {
+ info->default_ram_id = g_strdup(mc->default_ram_id);
+ info->has_default_ram_id = true;
+ }
entry = g_malloc0(sizeof(*entry));
entry->value = info;
diff --git a/qapi/machine.json b/qapi/machine.json
index 39caa1d914..76c1606390 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -355,13 +355,16 @@
# @default-cpu-type: default CPU model typename if none is requested via
# the -cpu argument. (since 4.2)
#
+# @default-ram-id: the default ID of initial RAM memory backend (since 5.1)
+#
# Since: 1.2.0
##
{ 'struct': 'MachineInfo',
'data': { 'name': 'str', '*alias': 'str',
'*is-default': 'bool', 'cpu-max': 'int',
'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
- 'deprecated': 'bool', '*default-cpu-type': 'str' } }
+ 'deprecated': 'bool', '*default-cpu-type': 'str',
+ '*default-ram-id': 'str' } }
##
# @query-machines:
--
2.26.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] qapi: Fix comment format for @CpuInstanceProperties
2020-05-26 8:25 ` [PATCH v2 1/2] qapi: Fix comment format for @CpuInstanceProperties Michal Privoznik
@ 2020-05-26 13:11 ` Igor Mammedov
0 siblings, 0 replies; 8+ messages in thread
From: Igor Mammedov @ 2020-05-26 13:11 UTC (permalink / raw)
To: Michal Privoznik; +Cc: armbru, qemu-devel, ehabkost
On Tue, 26 May 2020 10:25:34 +0200
Michal Privoznik <mprivozn@redhat.com> wrote:
> In 176d2cda0de, the @die-id attribute was introduced to
> CpuInstanceProperties type. However, it mangled the comment.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> qapi/machine.json | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/machine.json b/qapi/machine.json
> index ff7b5032e3..39caa1d914 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -824,7 +824,8 @@
> # @node-id: NUMA node ID the CPU belongs to
> # @socket-id: socket number within node/board the CPU belongs to
> # @die-id: die number within node/board the CPU belongs to (Since 4.1)
> -# @core-id: core number within die the CPU belongs to# @thread-id: thread number within core the CPU belongs to
> +# @core-id: core number within die the CPU belongs to
> +# @thread-id: thread number within core the CPU belongs to
> #
> # Note: currently there are 5 properties that could be present
> # but management should be prepared to pass through other
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] qmp: Expose MachineClass::default_ram_id
2020-05-26 8:25 ` [PATCH v2 2/2] qmp: Expose MachineClass::default_ram_id Michal Privoznik
@ 2020-05-26 13:15 ` Igor Mammedov
2020-05-26 13:17 ` Igor Mammedov
1 sibling, 0 replies; 8+ messages in thread
From: Igor Mammedov @ 2020-05-26 13:15 UTC (permalink / raw)
To: Michal Privoznik; +Cc: armbru, qemu-devel, ehabkost
On Tue, 26 May 2020 10:25:35 +0200
Michal Privoznik <mprivozn@redhat.com> wrote:
> 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>
> ---
> hw/core/machine-qmp-cmds.c | 4 ++++
> qapi/machine.json | 5 ++++-
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
> index 2c5da8413d..3e11a740c9 100644
> --- a/hw/core/machine-qmp-cmds.c
> +++ b/hw/core/machine-qmp-cmds.c
> @@ -238,6 +238,10 @@ MachineInfoList *qmp_query_machines(Error **errp)
> info->default_cpu_type = g_strdup(mc->default_cpu_type);
> info->has_default_cpu_type = true;
> }
> + if (mc->default_ram_id) {
> + info->default_ram_id = g_strdup(mc->default_ram_id);
> + info->has_default_ram_id = true;
> + }
>
> entry = g_malloc0(sizeof(*entry));
> entry->value = info;
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 39caa1d914..76c1606390 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -355,13 +355,16 @@
> # @default-cpu-type: default CPU model typename if none is requested via
> # the -cpu argument. (since 4.2)
> #
> +# @default-ram-id: the default ID of initial RAM memory backend (since 5.1)
> +#
> # Since: 1.2.0
> ##
> { 'struct': 'MachineInfo',
> 'data': { 'name': 'str', '*alias': 'str',
> '*is-default': 'bool', 'cpu-max': 'int',
> 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
> - 'deprecated': 'bool', '*default-cpu-type': 'str' } }
> + 'deprecated': 'bool', '*default-cpu-type': 'str',
> + '*default-ram-id': 'str' } }
>
> ##
> # @query-machines:
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] qmp: Expose MachineClass::default_ram_id
2020-05-26 8:25 ` [PATCH v2 2/2] qmp: Expose MachineClass::default_ram_id Michal Privoznik
2020-05-26 13:15 ` Igor Mammedov
@ 2020-05-26 13:17 ` Igor Mammedov
1 sibling, 0 replies; 8+ messages in thread
From: Igor Mammedov @ 2020-05-26 13:17 UTC (permalink / raw)
To: Michal Privoznik; +Cc: armbru, qemu-devel, ehabkost
On Tue, 26 May 2020 10:25:35 +0200
Michal Privoznik <mprivozn@redhat.com> wrote:
> 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>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/core/machine-qmp-cmds.c | 4 ++++
> qapi/machine.json | 5 ++++-
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
> index 2c5da8413d..3e11a740c9 100644
> --- a/hw/core/machine-qmp-cmds.c
> +++ b/hw/core/machine-qmp-cmds.c
> @@ -238,6 +238,10 @@ MachineInfoList *qmp_query_machines(Error **errp)
> info->default_cpu_type = g_strdup(mc->default_cpu_type);
> info->has_default_cpu_type = true;
> }
> + if (mc->default_ram_id) {
> + info->default_ram_id = g_strdup(mc->default_ram_id);
> + info->has_default_ram_id = true;
> + }
>
> entry = g_malloc0(sizeof(*entry));
> entry->value = info;
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 39caa1d914..76c1606390 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -355,13 +355,16 @@
> # @default-cpu-type: default CPU model typename if none is requested via
> # the -cpu argument. (since 4.2)
> #
> +# @default-ram-id: the default ID of initial RAM memory backend (since 5.1)
> +#
> # Since: 1.2.0
> ##
> { 'struct': 'MachineInfo',
> 'data': { 'name': 'str', '*alias': 'str',
> '*is-default': 'bool', 'cpu-max': 'int',
> 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
> - 'deprecated': 'bool', '*default-cpu-type': 'str' } }
> + 'deprecated': 'bool', '*default-cpu-type': 'str',
> + '*default-ram-id': 'str' } }
>
> ##
> # @query-machines:
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] qmp: Expose MachineClass::default_ram_id
2020-05-26 8:25 [PATCH v2 0/2] qmp: Expose MachineClass::default_ram_id Michal Privoznik
2020-05-26 8:25 ` [PATCH v2 1/2] qapi: Fix comment format for @CpuInstanceProperties Michal Privoznik
2020-05-26 8:25 ` [PATCH v2 2/2] qmp: Expose MachineClass::default_ram_id Michal Privoznik
@ 2020-07-27 18:41 ` Eduardo Habkost
2020-07-28 8:05 ` Michal Privoznik
2 siblings, 1 reply; 8+ messages in thread
From: Eduardo Habkost @ 2020-07-27 18:41 UTC (permalink / raw)
To: Michal Privoznik; +Cc: imammedo, qemu-devel, armbru
Hi Michal,
It looks like this has fallen through the cracks, my apologies.
I'm queueing this for 5.2. I assume this is the latest version,
correct?
On Tue, May 26, 2020 at 10:25:33AM +0200, Michal Privoznik wrote:
> v2 of:
>
> https://lists.nongnu.org/archive/html/qemu-devel/2020-05/msg07103.html
>
> diff to v1:
> - in 2/2 I made the default-ram-id optional, because as it turns out,
> not every machine type has it set.
>
> Michal Privoznik (2):
> qapi: Fix comment format for @CpuInstanceProperties
> qmp: Expose MachineClass::default_ram_id
>
> hw/core/machine-qmp-cmds.c | 4 ++++
> qapi/machine.json | 8 ++++++--
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> --
> 2.26.2
>
--
Eduardo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] qmp: Expose MachineClass::default_ram_id
2020-07-27 18:41 ` [PATCH v2 0/2] " Eduardo Habkost
@ 2020-07-28 8:05 ` Michal Privoznik
0 siblings, 0 replies; 8+ messages in thread
From: Michal Privoznik @ 2020-07-28 8:05 UTC (permalink / raw)
To: Eduardo Habkost; +Cc: imammedo, qemu-devel, armbru
On 7/27/20 8:41 PM, Eduardo Habkost wrote:
> Hi Michal,
>
> It looks like this has fallen through the cracks, my apologies.
>
> I'm queueing this for 5.2. I assume this is the latest version,
> correct?
>
Yes. No worries, I forgot about it too :-) If I remembered, I would have
pinged.
Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-07-28 8:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 8:25 [PATCH v2 0/2] qmp: Expose MachineClass::default_ram_id Michal Privoznik
2020-05-26 8:25 ` [PATCH v2 1/2] qapi: Fix comment format for @CpuInstanceProperties Michal Privoznik
2020-05-26 13:11 ` Igor Mammedov
2020-05-26 8:25 ` [PATCH v2 2/2] qmp: Expose MachineClass::default_ram_id Michal Privoznik
2020-05-26 13:15 ` Igor Mammedov
2020-05-26 13:17 ` Igor Mammedov
2020-07-27 18:41 ` [PATCH v2 0/2] " Eduardo Habkost
2020-07-28 8:05 ` Michal Privoznik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).