summaryrefslogtreecommitdiffstats
path: root/qemu-monitor.hx
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* slirp: Rework monitor commands for host forwardingJan Kiszka2009-06-291-3/+5
| | | | | | | | | | | Improve the monitor interface for adding and removing host forwarding rules by splitting it up in two commands and rename them to hostfwd_add and hostfwd_remove. Also split up the paths taken for legacy -redir support and the monitor add command as the latter will be extended later on. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "User networking: Show active connections"Jan Kiszka2009-06-291-2/+1
| | | | | | | | | | | | | | | This reverts commit 1c6ed9f3379faac83da0ed3e95cbd49003ac0dd1. It's redundant to slirp statistics, which are going to be split up / reworked later on. Conflicts: monitor.c net.c Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* set migration max downtimeGlauber Costa2009-06-161-0/+8
| | | | | | | | | | | | provide a monitor command to allow one to set the maximum downtime he is willing to suffer during migration, in seconds. "ms", "us", "ns" and "s" are accepted as modifiers. This parameter will be used by ram_save_live() code to determine a safe moment to enter stage 3 Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Use hxtool to generate monitor documentation and C structuresBlue Swirl2009-06-061-0/+608
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
OpenPOWER on IntegriCloud