summaryrefslogtreecommitdiff
path: root/monitor.c
AgeCommit message (Collapse)AuthorFilesLines
2009-03-05monitor: Rework early disk password inquiry (Jan Kiszka)aliguori1-4/+40
Reading the passwords for encrypted hard disks during early startup is broken (I guess for quiet a while now): - No monitor terminal is ready for input at this point - Forcing all mux'ed terminals into monitor mode can confuse other users of that channels To overcome these issues and to lay the ground for a clean decoupling of monitor terminals, this patch changes the initial password inquiry as follows: - Prevent autostart if there is some encrypted disk - Once the user tries to resume the VM, prompt for all missing passwords - Only resume if all passwords were accepted Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10_0@6699 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-05block: Improve bdrv_iterate (Jan Kiszka)aliguori1-1/+2
Make bdrv_iterate more useful by passing the BlockDriverState to the iterator instead of the device name. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10_0@6695 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-03SH4: Added monitoring of TLBsaurel321-1/+32
This patch might interest some people trying (as I try to do) to fix some tlbs for kernel/user space data sharing. Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6670 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-11qemu: PCI device, disk and host network hot-add / hot-remove (Marcelo Tosatti)aliguori1-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
2009-02-11Add a description for the set_link monitor command.aliguori1-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
2009-02-05toplevel: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori1-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
2009-01-24Synch code, help and docsblueswir11-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
2009-01-08Add 'set_link' monitor command (Mark McLoughlin)aliguori1-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
2008-12-28Fix -Werror=format-security warning (Frederik Himpe/Lennert Buytenhek)blueswir11-3/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6134 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-18new monitor func statusaurel321-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
2008-12-18Fix warnings introduced by commit 6081aurel321-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
2008-12-17Add HPET emulation to qemu (Beth Kon)aliguori1-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
2008-12-10Accept password as an argument to 'change vnc password' monitor command ↵aliguori1-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
2008-12-10Fix off-by-one bug limiting VNC passwords to 7 chars (Chris Webb)aliguori1-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
2008-12-04Add virtio-balloon supportaliguori1-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
2008-12-04Add ballooning infrastructure.aliguori1-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
2008-11-16Attached patch fixes a series of this warningblueswir11-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
2008-11-05Add KVM support to QEMUaliguori1-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
2008-10-31Implement "info chardev" command. (Gerd Hoffmann)aliguori1-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
2008-10-26Fix undeclared symbol warnings from sparseblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-21target-ppc: Convert XER accesses to TCGaurel321-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
2008-10-13Introduce UI for live migrationaliguori1-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
2008-10-06Allow the monitor to be suspended during non-blocking opaliguori1-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
2008-10-05Move wav_start_capture prototype to avoid a warning with -Wmissing-prototypesblueswir11-3/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5423 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-02Make monitor command tables constblueswir11-22/+22
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5399 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-01monitor: add sendkey support for comma, dot and slashaurel321-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
2008-10-01fix default size handling in monitoraurel321-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
2008-09-18Add "info uuid" command to monitor (Gleb Natapov)blueswir11-0/+11
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5258 c046a42c-6fe2-441c-8c8c-71466251a162
2008-09-16Move offsetof to osdep.h, remove local defintions.balrog1-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
2008-08-30Fix some warnings that would be generated by gcc -Wredundant-declsblueswir11-2/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5115 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-21Fix OpenBSD linker warningsblueswir11-4/+6
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5044 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-19Revert r4979 since it breaks the monitoraliguori1-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
2008-08-18Report unmapped addresses in memory_dump (Jan Kiszka)aliguori1-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
2008-08-17Fix warnings that would be generated by gcc -Wstrict-prototypesblueswir11-10/+31
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5021 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-13Add the altgr key name to the monitor, by Samuel Thibault.ths1-0/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5000 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-01Set focus to monitor to ask password if line is multiplexed (Laurent Vivier)aliguori1-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
2008-08-01Ask password when encrypted disk image is used (Laurent Vivier)aliguori1-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
2008-06-27More efficient target register / TC accesses.ths1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4794 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-22Add missing keys, sendkey support for all keysblueswir11-0/+17
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4774 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-20Add an opaque parameter to boot_set API, move function to monitor.cblueswir11-1/+11
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4763 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-18Add image format option in monitor for removable mediaaurel321-6/+14
(Chris Wright) CVE-2008-1945 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4747 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-09Fix the sendkey hold time calculation (Jan Kiszka).balrog1-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4703 c046a42c-6fe2-441c-8c8c-71466251a162
2008-06-08Enhance sendkey with key hold time (Jan Kiszka).balrog1-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
2008-06-04Add sysrq to key names known by "sendkey".balrog1-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
2008-06-04Refactor and fix do_sendkey (Jan Kiszka).balrog1-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
2008-05-28moved halted field to CPU_COMMONbellard1-7/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4609 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-24Tab-complete arguments for "logfile" in the monitor.balrog1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4568 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-04Allow bootdevice change from the monitoraurel321-0/+17
(Gildas Le Nadan) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4333 c046a42c-6fe2-441c-8c8c-71466251a162
2008-04-27Add a monitor command to raise NMIaurel321-0/+17
(Jan Kiszka) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4271 c046a42c-6fe2-441c-8c8c-71466251a162
2008-04-12Use correct memory types in do_physical_memory_save()aurel321-1/+1
(Stuart Brady) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4198 c046a42c-6fe2-441c-8c8c-71466251a162