summaryrefslogtreecommitdiffstats
path: root/monitor.c
Commit message (Collapse)AuthorAgeFilesLines
* qemu: PCI device, disk and host network hot-add / hot-remove (Marcelo Tosatti)aliguori2009-02-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | Add monitor command to hot-add PCI devices (nic and storage). Syntax is: pci_add pci_addr=[[<domain>:]<bus>:]<slot> nic|storage params It returns the domain, bus and slot for the newly added device on success. It is possible to attach a disk to a device after PCI initialization via the drive_add command. If so, a manual scan of the SCSI bus on the guest is necessary. Save QEMUMachine necessary for drive_init. Add monitor command to hot-remove devices, remove device data on _EJ0 notification. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6610 c046a42c-6fe2-441c-8c8c-71466251a162
* Add a description for the set_link monitor command.aliguori2009-02-111-1/+2
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6591 c046a42c-6fe2-441c-8c8c-71466251a162
* toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori2009-02-051-4/+0
| | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6531 c046a42c-6fe2-441c-8c8c-71466251a162
* Synch code, help and docsblueswir12009-01-241-5/+7
| | | | | | | | | | | | | | Rearrange code, help printout and docs so that they are in the same (hopefully more logical) order for easier maintenance. Add help and docs for undocumented options. Reformat slightly for more consistent help output. Add comments to encourage better synchronization in the future. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6432 c046a42c-6fe2-441c-8c8c-71466251a162
* Add 'set_link' monitor command (Mark McLoughlin)aliguori2009-01-081-0/+1
| | | | | | | | | | | | | | Add a monitor command to setting a given network device's link status to 'up' or 'down'. Allows simulation of network cable disconnect. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6247 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix -Werror=format-security warning (Frederik Himpe/Lennert Buytenhek)blueswir12008-12-281-3/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6134 c046a42c-6fe2-441c-8c8c-71466251a162
* new monitor func statusaurel322008-12-181-0/+11
| | | | | | | | | | | Attached is a small patch that adds the new info subcommand - status. The status indicates if the VM is running or paused this info makes life for (stateless) Qemu/KVM frontends easier. (Philipp Wehrheim) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6094 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix warnings introduced by commit 6081aurel322008-12-181-0/+2
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6084 c046a42c-6fe2-441c-8c8c-71466251a162
* Add HPET emulation to qemu (Beth Kon)aliguori2008-12-171-0/+7
| | | | | | | | | | | | | | This patch adds HPET emulation. It can be disabled with -disable-hpet. An hpet provides a more finely granular clocksource than otherwise available on PC. This means that latency-dependent applications (e.g. multimedia) will generally be smoother when using the HPET. Signed-off-by: Beth Kon <eak@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6081 c046a42c-6fe2-441c-8c8c-71466251a162
* Accept password as an argument to 'change vnc password' monitor command ↵aliguori2008-12-101-5/+9
| | | | | | | | | | | | | | (Chris Webb) This allows easier use of the change vnc password monitor command from management scripts, without having to implement expect(1)-like behaviour. Signed-off-by: Chris Webb <chris@arachsys.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5967 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix off-by-one bug limiting VNC passwords to 7 chars (Chris Webb)aliguori2008-12-101-2/+1
| | | | | | | | | | | | | | | monitor_readline expects buf_size to include the terminating \0, but do_change_vnc in monitor.c calls it as though it doesn't. The other site where monitor_readline reads a password (in vl.c) passes the buffer length correctly. Signed-off-by: Chris Webb <chris@arachsys.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5966 c046a42c-6fe2-441c-8c8c-71466251a162
* Add virtio-balloon supportaliguori2008-12-041-1/+3
| | | | | | | | | | | | | | This adds a VirtIO based balloon driver. It uses madvise() to actually balloon the memory when possible. Until 2.6.27, KVM forced memory pinning so we must disable ballooning unless the kernel actually supports it when using KVM. It's always safe when using TCG. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5874 c046a42c-6fe2-441c-8c8c-71466251a162
* Add ballooning infrastructure.aliguori2008-12-041-0/+22
| | | | | | | | | | | | | | Balloon devices allow you to ask the guest to allocate memory. This allows you to release that memory. It's mostly useful for freeing up large chunks of memory from cooperative guests. Ballooning is supported by both Xen and VirtIO. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5873 c046a42c-6fe2-441c-8c8c-71466251a162
* Attached patch fixes a series of this warningblueswir12008-11-161-19/+19
| | | | | | | | | | | when compiling on NetBSD: warning: array subscript has type 'char' Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5727 c046a42c-6fe2-441c-8c8c-71466251a162
* Add KVM support to QEMUaliguori2008-11-051-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds very basic KVM support. KVM is a kernel module for Linux that allows userspace programs to make use of hardware virtualization support. It current supports x86 hardware virtualization using Intel VT-x or AMD-V. It also supports IA64 VT-i, PPC 440, and S390. This patch only implements the bare minimum support to get a guest booting. It has very little impact the rest of QEMU and attempts to integrate nicely with the rest of QEMU. Even though this implementation is basic, it is significantly faster than TCG. Booting and shutting down a Linux guest: w/TCG: 1:32.36 elapsed 84% CPU w/KVM: 0:31.14 elapsed 59% CPU Right now, KVM is disabled by default and must be explicitly enabled with -enable-kvm. We can enable it by default later when we have had better testing. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5627 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement "info chardev" command. (Gerd Hoffmann)aliguori2008-10-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes qemu keep track of the character devices in use and implements a "info chardev" monitor command to print a list. qemu_chr_open() sticks the devices into a linked list now. It got a new argument (label), so there is a name for each device. It also assigns a filename to each character device. By default it just copyes the filename passed in. Individual drivers can fill in something else though. qemu_chr_open_pty() sets the filename to name of the pseudo tty allocated. Output looks like this: (qemu) info chardev monitor: filename=unix:/tmp/run.sh-26827/monitor,server,nowait serial0: filename=unix:/tmp/run.sh-26827/console,server serial1: filename=pty:/dev/pts/5 parallel0: filename=vc:640x480 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5575 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix undeclared symbol warnings from sparseblueswir12008-10-261-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
* target-ppc: Convert XER accesses to TCGaurel322008-10-211-1/+1
| | | | | | | | | | Define XER bits as a single register and access them individually to avoid defining 5 32-bit registers (TCG doesn't permit to map 8-bit registers). Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5500 c046a42c-6fe2-441c-8c8c-71466251a162
* Introduce UI for live migrationaliguori2008-10-131-0/+8
| | | | | | | | | | | | This patch introduces a command line parameter and monitor command for starting a live migration. The next patch will provide an example of how to use these parameters. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5476 c046a42c-6fe2-441c-8c8c-71466251a162
* Allow the monitor to be suspended during non-blocking opaliguori2008-10-061-1/+18
| | | | | | | | | | | | | | | | Live migration happens in the background, but it is useful to make the monitor command appear as if it's blocking. This allows a management tool to immediately know when the live migration has completed without having to poll the migration status. This patch allows the monitor to be suspended from a monitor callback which will prevent new monitor commands from being executed. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5431 c046a42c-6fe2-441c-8c8c-71466251a162
* Move wav_start_capture prototype to avoid a warning with -Wmissing-prototypesblueswir12008-10-051-3/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5423 c046a42c-6fe2-441c-8c8c-71466251a162
* Make monitor command tables constblueswir12008-10-021-22/+22
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5399 c046a42c-6fe2-441c-8c8c-71466251a162
* monitor: add sendkey support for comma, dot and slashaurel322008-10-011-0/+3
| | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5384 c046a42c-6fe2-441c-8c8c-71466251a162
* fix default size handling in monitoraurel322008-10-011-1/+1
| | | | | | | | | | | | If /i format is used once (with x/xp/p command) default_fmt_size is set to -1 and subsequent commands of the form /x outputs nothing. Included patched fixes this by setting default_fmt_size only if the command is not of format /i. Signed-off-by: Gleb Natapov <gleb@qumranet.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5381 c046a42c-6fe2-441c-8c8c-71466251a162
* Add "info uuid" command to monitor (Gleb Natapov)blueswir12008-09-181-0/+11
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5258 c046a42c-6fe2-441c-8c8c-71466251a162
* Move offsetof to osdep.h, remove local defintions.balrog2008-09-161-4/+0
| | | | | | | | With this container_of can actually be used without causing build errors. Reformat container_of. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5234 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix some warnings that would be generated by gcc -Wredundant-declsblueswir12008-08-301-2/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5115 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix OpenBSD linker warningsblueswir12008-08-211-4/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5044 c046a42c-6fe2-441c-8c8c-71466251a162
* Revert r4979 since it breaks the monitoraliguori2008-08-191-1/+7
| | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5028 c046a42c-6fe2-441c-8c8c-71466251a162
* Report unmapped addresses in memory_dump (Jan Kiszka)aliguori2008-08-181-1/+4
| | | | | | | | | | | | Instead of dumping incorrect (ie. previously read) data, report the invalid virtual address to the user. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5023 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix warnings that would be generated by gcc -Wstrict-prototypesblueswir12008-08-171-10/+31
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5021 c046a42c-6fe2-441c-8c8c-71466251a162
* Add the altgr key name to the monitor, by Samuel Thibault.ths2008-08-131-0/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5000 c046a42c-6fe2-441c-8c8c-71466251a162
* Set focus to monitor to ask password if line is multiplexed (Laurent Vivier)aliguori2008-08-011-2/+15
| | | | | | | | | | | | | | | | | | | This patch allows to display the "Password:" prompt if we use encrypted disk with "-nographic" option. It also modifies management of "-nographic" to not override user's choices for "-serial", "-parallel" and "-monitor". When qemu has to ask a password with "-nographic" with a multiplexed serial interface, it forces the focus to the monitor and restore original focus after. Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4979 c046a42c-6fe2-441c-8c8c-71466251a162
* Ask password when encrypted disk image is used (Laurent Vivier)aliguori2008-08-011-7/+1
| | | | | | | | | | | | | | | | | This patch repairs the management of encrypted disk images and allows to enter the password. Changelog: v2: - move read_password() before do_loadvm() - really start monitor if output is stdio. Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4976 c046a42c-6fe2-441c-8c8c-71466251a162
* More efficient target register / TC accesses.ths2008-06-271-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4794 c046a42c-6fe2-441c-8c8c-71466251a162
* Add missing keys, sendkey support for all keysblueswir12008-06-221-0/+17
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4774 c046a42c-6fe2-441c-8c8c-71466251a162
* Add an opaque parameter to boot_set API, move function to monitor.cblueswir12008-06-201-1/+11
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4763 c046a42c-6fe2-441c-8c8c-71466251a162
* Add image format option in monitor for removable mediaaurel322008-06-181-6/+14
| | | | | | | | | (Chris Wright) CVE-2008-1945 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4747 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix the sendkey hold time calculation (Jan Kiszka).balrog2008-06-091-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4703 c046a42c-6fe2-441c-8c8c-71466251a162
* Enhance sendkey with key hold time (Jan Kiszka).balrog2008-06-081-19/+39
| | | | | | | | | | | | | | | | | | | | | | Current key injection via the monitor basically generates no key hold time. This is fine for keyboard emulations that have their own queues, but it causes troubles for those how don't (like the MusicPal - it simply does not work with injected keys). Moreover, I would like to use this mechanism to simulate pressed buttons during power-up. Therefore, this patch enhances the key injection with a configurable release delay (by default 100 virtual milliseconds). This feature allows to get rid of the initial sleep() in musicpal_init because one can now simply start qemu with -S and issue "sendkey m 1000" and "continue" in the monitor to achieve the desired effect of a pressed menu button during power-up. So there is no need for a per-musicpal or even qemu-wide "-hold-button" switch. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4701 c046a42c-6fe2-441c-8c8c-71466251a162
* Add sysrq to key names known by "sendkey".balrog2008-06-041-0/+1
| | | | | | | | | | | | | | Adding sysrq keycode to the table enabling running sysrq debugging in the guest via the monitor sendkey command, like: (qemu) sendkey alt-sysrq-t Tested on x86-64 target and Linux guest. Signed-off-by: Ryan Harper <ryanh@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4658 c046a42c-6fe2-441c-8c8c-71466251a162
* Refactor and fix do_sendkey (Jan Kiszka).balrog2008-06-041-23/+28
| | | | | | | | | | | | Looking at the sendkey implementation, planning to enhance it with a hold time argument, I found some potential out-of-bound access and not very readable code. Here is a fix for the former and a (subjective) improvement of the latter. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4657 c046a42c-6fe2-441c-8c8c-71466251a162
* moved halted field to CPU_COMMONbellard2008-05-281-7/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4609 c046a42c-6fe2-441c-8c8c-71466251a162
* Tab-complete arguments for "logfile" in the monitor.balrog2008-05-241-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4568 c046a42c-6fe2-441c-8c8c-71466251a162
* Allow bootdevice change from the monitoraurel322008-05-041-0/+17
| | | | | | | (Gildas Le Nadan) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4333 c046a42c-6fe2-441c-8c8c-71466251a162
* Add a monitor command to raise NMIaurel322008-04-271-0/+17
| | | | | | | (Jan Kiszka) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4271 c046a42c-6fe2-441c-8c8c-71466251a162
* Use correct memory types in do_physical_memory_save()aurel322008-04-121-1/+1
| | | | | | | (Stuart Brady) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4198 c046a42c-6fe2-441c-8c8c-71466251a162
* physical memory dump to fileaurel322008-04-111-0/+28
| | | | | | | (Marvin Flumm) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4195 c046a42c-6fe2-441c-8c8c-71466251a162
* Add an ncurses UI.balrog2008-02-101-0/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3976 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix miscellaneous minor things, by Andre Przywara.ths2007-12-171-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3826 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud