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 description

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 i

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

2021-06-28 Thread Mirela Grujic
6/3/21 6:02 PM, Paolo Bonzini wrote: On 01/06/21 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 rig

[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
ds in the same fashion as QEMU 5.2'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

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 that

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 a

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

2021-05-14 Thread Mirela Grujic
roach, then this series would 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

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

2021-05-13 Thread Mirela Grujic
w-init-config' option has 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 regi

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

2021-05-13 Thread Mirela Grujic
only when they're needed - before the machine is initialized, in the accel-created phase. To enable 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:

[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 +++

[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
tialized() 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/

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

2021-05-13 Thread Mirela Grujic
en the machine is in 'accel-created' 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..31872aa

[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
before, but just groups them into chunks (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-b

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

2021-05-13 Thread Mirela Grujic
{"phase": "initialized"}} (QEMU) device_add driver=... {"return": {}} (QEMU) next-machine-phase {"return": {}} (QEMU) query-machine-phase {"return": {"phase": "ready"}} Note that with the introduced changes, devices can still be