summaryrefslogtreecommitdiffstats
path: root/qemu-monitor.hx
Commit message (Collapse)AuthorAgeFilesLines
* monitor: convert do_device_add() to QObjectMarkus Armbruster2010-03-161-1/+2
|
* monitor: Use argument type 'O' for device_addMarkus Armbruster2010-03-161-2/+2
| | | | While there, improve the params help text.
* Monitor: Rename cmd_new_ret()Luiz Capitulino2010-02-191-21/+21
| | | | | | | | Now that all handlers are converted to cmd_new_ret(), we can rename it back to cmd_new(). But now it returns a value. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_change() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | | | Not that trivial as the call chain also has to be modified. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_info() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | | | | Note that this function only fails in QMP, in the user Monitor it prints the help text instead. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_physical_memory_save() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_memory_save() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_migrate() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | | | | While there I'm also dropping a unneeded else clause (the last one in the function). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert pci_device_hot_remove() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert pci_device_hot_add() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_closefd() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_getfd() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_block_set_passwd() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_cpu_set() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_eject() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert do_cont() to cmd_new_ret()Luiz Capitulino2010-02-191-1/+1
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Monitor: Convert simple handlers to cmd_new_ret()Luiz Capitulino2010-02-191-8/+8
| | | | | | | | | | | | | | | | | The following handlers always succeed and hence can be converted to cmd_new_ret() in the same commit. - do_stop() - do_quit() - do_system_reset() - do_system_powerdown() - do_migrate_cancel() - do_qmp_capabilities() - do_migrate_set_speed() - do_migrate_set_downtime() Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce the qmp_capabilities commandLuiz Capitulino2010-02-101-0/+14
| | | | | | | | | | | | | | | | | | | | | This command will be used to enable QMP capabilities advertised by the capabilities array. Note that it will be mandatory to issue this command in order to make QMP functional (although this behavior is not being enforced by this commit). Also, as we don't have any capabilities yet, the new command doesn't accept any arguments. I will postpone the decision for a format for this until we get our first capability. Finally, this command is visible from the user Monitor too, in the meaning that you can execute it but it won't do anything. Making it only visible in QMP is beyond this series' goal, as it requires changes in unrelated places. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Documentation: Add monitor commands to function indexStefan Weil2010-02-101-1/+61
| | | | | | | | | * Add monitor commands to function index. * Fix description for acl_remove. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: convert do_migrate_set_downtime() to QObjectMarkus Armbruster2010-02-031-1/+2
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Use argument type 'T' for migrate_set_downtimeMarkus Armbruster2010-02-031-1/+1
| | | | | | | | | | | | | | Before, it used type 's', which strips quotes and interprets escapes, and is quite inappropriate for QMP. Negative arguments are no flushed to zero. Before, they were cast to uint32_t, which wrecked the sign. Ridiculously large arguments including infinities are now rejected. Before, they were interpreted as zero. Same for NaN. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: convert do_migrate_set_speed() to QObjectMarkus Armbruster2010-02-031-1/+2
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Use argument type 'b' for migrate_set_speedMarkus Armbruster2010-02-031-1/+1
| | | | | | | | | | | | | | Before, it used type 's', which strips quotes and interprets escapes, and is quite inappropriate for QMP. Negative arguments are no flushed to zero. Before, they were cast to uint32_t, which wrecked the sign. Ridiculously large arguments including infinities are now rejected. Before, they were interpreted as zero. Same for NaN. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio: Add memory statistics reporting to the balloon driverAdam Litke2010-01-261-1/+2
| | | | | | | | | | | | | | | | When using ballooning to manage overcommitted memory on a host, a system for guests to communicate their memory usage to the host can provide information that will minimize the impact of ballooning on the guests. The current method employs a daemon running in each guest that communicates memory statistics to a host daemon at a specified time interval. The host daemon aggregates this information and inflates and/or deflates balloons according to the level of host memory pressure. This approach is effective but overly complex since a daemon must be installed inside each guest and coordinated to communicate with the host. A simpler approach is to collect memory statistics in the virtio balloon driver and communicate them directly to the hypervisor. Signed-off-by: Adam Litke <agl@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: convert do_cpu_set() to QObject, QErrorMarkus Armbruster2010-01-261-1/+2
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "monitor: Convert do_migrate_set_speed() to QObject"Anthony Liguori2009-12-191-2/+1
| | | | | | | | | | | | This reverts commit 3a4921047d514c336531c304bec362c4d138ebcc. From Luiz: do_migrate_set_speed() accepts a suffix for the 'value' argument and this is not good for QMP. We will have to add a new argument type to handle that and this will have to wait for 0.13. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: do_balloon(): Use 'M' argument typeLuiz Capitulino2009-12-191-1/+1
| | | | | | | | This makes do_balloon() accept megabyte values from the user Monitor while accepting byte values for QMP. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Use 'device' in ejectLuiz Capitulino2009-12-181-1/+1
| | | | | | | | Monitor's eject command uses 'filename' for the device name argument, but 'device' is a better name. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* PCI: Convert pci_device_hot_add() to QObjectLuiz Capitulino2009-12-121-1/+2
| | | | | | | | | | | | | Return a QDict with information about the just added device. This commit should not change user output. Please, note that this patch does not do error handling conversion. In error conditions the handler still calls monitor_printf(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: convert do_change() to QObject, QErrorMarkus Armbruster2009-12-071-1/+2
| | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Introduce 'block_passwd' commandLuiz Capitulino2009-12-071-0/+14
| | | | | | | | | | | | | | | | | | When using encrypted disk images, QEMU will prompt the user for passwords when started. This makes sense for the user protocol, but doesn't for QMP. The solution is to have Monitor command which allows the user or a Client to set passwords in advance, so that we avoid the prompt completely. This is what block_passwd does, for example: (QEMU) block_passwd ide0-hd0 foobar Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Enable migration without shared storage from the monitorlirans@il.ibm.com2009-11-171-6/+13
| | | | | | | | | | | | | | | This patch adds the option to activate non-shared storage migration from the monitor. The migration command is as follows: (qemu) migrate -d tcp:0:4444 # for ordinary live migration (qemu) migrate -d -b tcp:0:4444 # for live migration with complete storage copy (qemu) migrate -d -i tcp:0:4444 # for live migration with incremental storage copy, storage is cow based. Changes from v4: - Minor coding style issues. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_closefd() to QObjectLuiz Capitulino2009-10-271-1/+2
| | | | | | | Note that errors are not being converted yet. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_getfd() to QObjectLuiz Capitulino2009-10-271-1/+2
| | | | | | | Note that errors are not being converted yet. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_eject() to QObjectLuiz Capitulino2009-10-271-1/+2
| | | | | | | Note that errors are not being converted yet. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_pci_device_hot_remove() to QObjectLuiz Capitulino2009-10-271-1/+2
| | | | | | | | Errors are still directly printed, as we are only converting regular output. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_migrate_cancel() to QObjectLuiz Capitulino2009-10-271-1/+2
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_migrate_set_speed() to QObjectLuiz Capitulino2009-10-271-1/+2
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_migrate() to QObjectLuiz Capitulino2009-10-271-1/+2
| | | | | | | | Error is still directly printed, as we are only converting regular output. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_physical_memory_save() to QObjectLuiz Capitulino2009-10-271-1/+2
| | | | | | | Note that errors are not being converted yet. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_memory_save() to QObjectLuiz Capitulino2009-10-271-1/+2
| | | | | | | Note that errors are not being converted yet. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_balloon() to QObjectLuiz Capitulino2009-10-081-1/+2
| | | | | | | | | It is important to note that it never fails, as big refactoring of the virtio code would be needed to get the proper error code. Patchworks-ID: 35349 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_cont() to QObjectLuiz Capitulino2009-10-081-1/+2
| | | | | | | | | | | Appropriate error handling support will be needed to have encrypted images working under the future machine protocol, but this initial conversion will work with the current user protocol. Patchworks-ID: 35348 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_system_powerdown() to QObjectLuiz Capitulino2009-10-081-1/+2
| | | | | | Patchworks-ID: 35346 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_system_reset() to QObjectLuiz Capitulino2009-10-081-1/+2
| | | | | | Patchworks-ID: 35347 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_stop() to QObjectLuiz Capitulino2009-10-081-1/+2
| | | | | | Patchworks-ID: 35343 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_quit() do QObjectLuiz Capitulino2009-10-081-1/+2
| | | | | | Patchworks-ID: 35345 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: do_info(): handle new and old info handlersLuiz Capitulino2009-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | do_info() is special, its job is to call 'info handlers'. This is similar to what monitor_handle_command() does, therefore do_info() also has to distinguish among new and old style info handlers. This commit converts do_info() to the new QObject style and makes the appropriate changes so that it can handle both info handlers styles. In the future, when all handlers are converted to QObject's style, it will be possible to share more code with monitor_handle_command(). This commit also introduces a new function called monitor_user_noop(), it should be used by handlers which do not have data to print. This is the case of do_info(). Patchworks-ID: 35341 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: union for command handlersLuiz Capitulino2009-10-081-61/+61
| | | | | | | | | | | | This commits adds a new union member to mon_cmd_t for command handlers and convert monitor_handle_command() and qemu-monitor.hx to use it. This improves type safety. Patchworks-ID: 35337 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert mon_cmd_t initializations to C99 styleLuiz Capitulino2009-10-081-125/+488
| | | | | | Patchworks-ID: 35335 Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud