Re: KVM call minutes for 2022-01-25

2022-01-26 Thread Mirela Grujic
On 1/25/22 5:54 PM, Philippe Mathieu-Daudé wrote: On 25/1/22 17:39, Juan Quintela wrote: Hi Today we have the KVM devel call.  We discussed how to create machines from QMP without needing to recompile QEMU. Three different problems: - startup QMP (*)    not discussed today - one binary or

RFC: QMP configuration - allocating/setting qdev array properties?

2022-01-11 Thread Mirela Grujic
Hi, While working on a prototype and configuring a whole machine using QMP we run into the following scenario. Some device models use array properties. The array is allocated when len- property is set, then, individual elements of the array can be set as any other property (see

Re: [RFC PATCH] docs/specs: QMP configuration design specification

2021-09-20 Thread Mirela Grujic
Hi, We haven't got any feedback on this, anyone, please? Thanks, Mirela On 6/28/21 11:55 AM, Mirela Grujic wrote: Hi, While implementing a prototype we run into a couple of challenges. We're not sure whether our current implementation would be acceptable and whether there is a better

Re: [RFC PATCH] docs/specs: QMP configuration design specification

2021-06-28 Thread Mirela Grujic
12:07, Mirela Grujic wrote: diff --git a/docs/specs/qmp-configuration.txt b/docs/specs/qmp-configuration.txt new file mode 100644 index 00..69ff49cae6 --- /dev/null +++ b/docs/specs/qmp-configuration.txt docs/specs is not the right place, as it is for guest devices

[RFC PATCH] docs/specs: QMP configuration design specification

2021-06-01 Thread Mirela Grujic
/qmp-shell ./qmp-sock Welcome to the QMP low-level shell! Connected to QEMU 6.0.0 (QEMU) query-machine-phase {"return": {"phase": "accel-created"}} (QEMU) x-machine-init {"return": {}} (QEMU) device_add driver=... ... (QEMU) x-exit-preconfig {"return&q

Re: [RFC PATCH 0/9] Initial support for machine creation via QMP

2021-05-21 Thread Mirela Grujic
s implementation of object-add. Thanks for posting these patches, I have started a light review of them. Paolo On 13/05/21 10:25, Mirela Grujic wrote: The direction for this work has been set in the discussion thread: "About creating machines on the command line" in January/February 2

Re: [RFC PATCH 2/9] replace machine phase_check with machine_is_initialized/ready calls

2021-05-14 Thread Mirela Grujic
On 5/13/21 7:46 PM, Paolo Bonzini wrote: On 13/05/21 10:25, Mirela Grujic wrote: Once we define MachineInitPhase in qapi, the generated enumeration constants will be prefixed with the MACHINE_INIT_PHASE_. We need to define the MachineInitPhase enum in qapi in order to add the QMP command

Re: [RFC PATCH 7/9] qdev-monitor: Restructure and fix the check for command availability

2021-05-14 Thread Mirela Grujic
On 5/13/21 7:43 PM, Paolo Bonzini wrote: On 13/05/21 10:25, Mirela Grujic wrote: The existing code had to be restructured to make room for adding checks that are specific to the machine phases. The fix is related to the way that commands with the 'allow-preconfig' option are treated

Re: [RFC PATCH 0/9] Initial support for machine creation via QMP

2021-05-14 Thread Mirela Grujic
likely be split into a couple of patches that are applicable and the rest that is obsolete. In summary, we believe it would be great to join efforts, please let us know how can we help. Thanks, Mirela Paolo On 13/05/21 10:25, Mirela Grujic wrote: The direction for this work has been set in the dis

[RFC PATCH 9/9] qapi: Allow some commands to be executed in machine 'initialized' phase

2021-05-13 Thread Mirela Grujic
no effect because the command appears to bypass QAPI (see TODO at qapi/qdev.json:61). The option is added there solely to document the intent. For the same reason, the flags have to be explicitly set in monitor_init_qmp_commands() when the device_add command is registered. Signed-off-by: Mirela

[RFC PATCH 7/9] qdev-monitor: Restructure and fix the check for command availability

2021-05-13 Thread Mirela Grujic
a command after the machine gets initialized and before it becomes ready, one should use 'allow-init-config' option that will be introduced in the following patch. Signed-off-by: Mirela Grujic --- softmmu/qdev-monitor.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions

[RFC PATCH 5/9] qapi: Implement 'next-machine-phase' command

2021-05-13 Thread Mirela Grujic
the next phase. The command is used in combination with -preconfig command line option. Note: advancing the machine to the final phase has the same effect as executing 'x-exit-preconfig' command. Signed-off-by: Mirela Grujic --- qapi/machine.json | 24 include

[RFC PATCH 8/9] qapi: Introduce 'allow-init-config' option

2021-05-13 Thread Mirela Grujic
This option will be used to select the commands which are allowed to execute during the MACHINE_INIT_PHASE_INITIALIZED machine phase. Signed-off-by: Mirela Grujic --- docs/sphinx/qapidoc.py | 2 +- include/qapi/qmp/dispatch.h | 1 + softmmu/qdev-monitor.c | 5 + scripts/qapi

[RFC PATCH 4/9] qapi: Implement 'query-machine-phase' command

2021-05-13 Thread Mirela Grujic
The command returns current machine initialization phase. >From now on, the MachineInitPhase enum is generated. Signed-off-by: Mirela Grujic --- qapi/machine.json | 54 ++ include/hw/qdev-core.h | 29 +--- hw/core/machine-

[RFC PATCH 2/9] replace machine phase_check with machine_is_initialized/ready calls

2021-05-13 Thread Mirela Grujic
zed() phase_check(PHASE_MACHINE_READY) -> machine_is_ready() 2) rename enums Once 1) and 2) are done MachineInitPhase enum will be generated. Signed-off-by: Mirela Grujic --- include/hw/qdev-core.h | 2 ++ hw/core/machine-qmp-cmds.c | 2 +- hw/core/machine.c | 2 +- hw/core/

[RFC PATCH 6/9] qapi: Implement 'advance-machine-phase' command

2021-05-13 Thread Mirela Grujic
' phase. Signed-off-by: Mirela Grujic --- qapi/machine.json | 26 ++ hw/core/machine-qmp-cmds.c | 10 ++ 2 files changed, 36 insertions(+) diff --git a/qapi/machine.json b/qapi/machine.json index 968d67dd95..31872aae72 100644 --- a/qapi/machine.json +++ b/qapi

[RFC PATCH 3/9] rename MachineInitPhase enumeration constants

2021-05-13 Thread Mirela Grujic
This renaming is a second phase in getting the code ready for defining MachineInitPhase in qapi (enumeration constants are going to be generated and prefixed with a name derived from the enumeration type, i.e. MACHINE_INIT_PHASE_. Signed-off-by: Mirela Grujic --- include/hw/qdev-core.h | 10

[RFC PATCH 1/9] vl: Allow finer control in advancing machine through phases

2021-05-13 Thread Mirela Grujic
(if branches) and allows stepping through machine init phases. For now, the relevant target machine phases are only PHASE_MACHINE_INITIALIZED and PHASE_MACHINE_READY, but the approach allows to easily add more or split existing phases if needed. Signed-off-by: Mirela Grujic --- include/hw/qdev-core.h

[RFC PATCH 0/9] Initial support for machine creation via QMP

2021-05-13 Thread Mirela Grujic
t;return": {}} (QEMU) next-machine-phase {"return": {}} (QEMU) query-machine-phase {"return": {"phase": "ready"}} Note that with the introduced changes, devices can still be added via CLI, i.e. we support a mixed configuration approach (CLI, QMP, or CLI/