summaryrefslogtreecommitdiffstats
path: root/qemu-monitor.hx
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* qdev hotplug: infrastructure and monitor commands.Gerd Hoffmann2009-10-051-2/+18
| | | | | | | | | | | | | | | Adds device_add and device_del commands. device_add accepts accepts the same syntax like the -device command line switch. device_del expects a device id. So you should tag your devices with ids if you want to remove them later on, like this: device_add pci-ohci,id=ohci device_del ohci Unplugging via pci_del or usb_del works too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Fix do_wav_capture() argument typeLuiz Capitulino2009-09-261-1/+1
| | | | | | | | | Currently do_wav_capture() path's argument type is 's' (string), but it should be 'F' (filename), this way 'wavcapture' gets command completion. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* monitor: Fix do_commit() argument typeLuiz Capitulino2009-09-261-1/+1
| | | | | | | | Currently do_commit() argument type is 's' (string), but it should be 'B' (block), this way 'commit' gets command completion. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* monitor: New format for handlers argument typesLuiz Capitulino2009-09-041-54/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current handlers argument types, as defined in qemu-monitor.hx file, are a sequence of chars where each one represents one argument type of the command handler. The number of chars is also used to know how many arguments a given handler accepts. This commit defines a new format, which makes mandatory the use of a name for each argument. For example, do_eject() command handler is currently defined as: { "eject", "-fB", do_eject, ... } With the new format it becomes: { "eject", "force:-f,filename:B", do_eject, ... } This way the Monitor will be capable of setting up a dictionary, using each argument's name as the key and the argument itself as the value. This commit also adds two new functions: key_get_info() and next_arg_type(), both are used to parse the new format. Currently key_get_info() consumes the 'key' part of the new format and discards it, this way the current parsing code is not affected by this change. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add wrappers to functions used by the MonitorLuiz Capitulino2009-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | Some functions exported to be used by the Monitor as command handlers are also called in other places as regular functions. When those functions got ported to use the Monitor dictionary to pass argments, the callers will have to setup a dictionary to be able to call them. To avoid this problem, this commit add wrappers to those functions, so that we change the wrapper to accept the dictionary, letting the current functions as is. The following wrappers are being added: - do_help_cmd() - do_pci_device_hot_remove() Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Unbreak large mem support by removing kqemuAnthony Liguori2009-08-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | kqemu introduces a number of restrictions on the i386 target. The worst is that it prevents large memory from working in the default build. Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on the TSC as a time source which will not be reliable on a multiple processor system in userspace. Since most modern processors are multicore, this severely limits the utility of kqemu. kvm is a viable alternative for people looking to accelerate qemu and has the benefit of being supported by the upstream Linux kernel. If someone can implement work arounds to remove the restrictions introduced by kqemu, I'm happy to avoid and/or revert this patch. N.B. kqemu will still function in the 0.11 series but this patch removes it from the 0.12 series. Paul, please Ack or Nack this patch. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add getfd and closefd monitor commandsMark McLoughlin2009-07-271-0/+18
| | | | | | | | | | | | | | | Add monitor commands to support passing file descriptors via SCM_RIGHTS. getfd assigns the passed file descriptor a name for use with other monitor commands. closefd allows passed file descriptors to be closed. If a monitor command actually uses a named file descriptor, closefd will not be required. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Add port write commandJan Kiszka2009-07-161-0/+5
| | | | | | | | Useful for testing hardware emulations or manipulating its state to stress guest drivers. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QEMU: MCE: Add MCE simulation to qemu/tcgHuang Ying2009-07-091-0/+8
| | | | | | | | | | | - MCE features are initialized when VCPU is intialized according to CPUID. - A monitor command "mce" is added to inject a MCE. - A new interrupt mask: CPU_INTERRUPT_MCE is added to inject the MCE. aliguori: fix build for linux-user Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Fix typo in documentationJan Kiszka2009-07-031-1/+1
| | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* monitor: Refactor acl commndsJan Kiszka2009-06-291-37/+39
| | | | | | | | | | Refactor the ACL monitor interface to make full use of the monitor command dispatcher. This also gives proper help formatting and command completion. Note that 'acl allow' and 'acl deny' were combined to 'acl_add aclname match allow|deny [index]' for consistency reasons. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Make pci_add device options truely optionalJan Kiszka2009-06-291-1/+1
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Drop pci_addr prefix from hotplug commandsJan Kiszka2009-06-291-3/+3
| | | | | | | | | The "pci_addr=" prefix currently required by pci_add/remove and drive_add has no practical use. Drop it, but still silently accept it for backward compatibility. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* slirp: Make hostfwd_add/remove multi-instance-awareJan Kiszka2009-06-291-4/+4
| | | | | | | | | Extend the syntax of hostfwd_add/remove to optionally take a tuple of VLAN ID and slirp stack name. If those are omitted, the commands will continue to work on the first registered slirp stack. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* slirp: Drop statistic codeJan Kiszka2009-06-291-2/+0
| | | | | | | | | As agreed on the mailing list, there is no interest in keeping the usually disabled slirp statistics in the tree. So this patch removes them. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* slirp: Add info usernet for dumping connection statesJan Kiszka2009-06-291-0/+2
| | | | | | | | | Break out sockstats from the slirp statistics and present them under the new info category "usernet". This patch also improves the current output /wrt proper reporting connection source and destination. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* slirp: Bind support for host forwarding rulesJan Kiszka2009-06-291-2/+3
| | | | | | | | | Extend the hostfwd rule format so that the user can specify on which host interface qemu should listen for incoming connections. If omitted, binding will takes place against all interfaces. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud