History | View | Annotate | Download (86.7 kB)
monitor: fail when 'i' type is greater than 32-bit
The 'i' argument type is for 32-bit only and most handlerswill use an 'int' to store its value.
It's better to fail gracefully when the user enters a valuegreater than 32-bit than to get subtle casting bugs....
monitor: Update supported types documentation
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Drop handler_8 and handler_9
Commit 79c4f6b08009a1d23177c2be8bd003253cf3686a added handler_8 andhandler_9 handling, but there isn't any command handler with thosenumber of arguments.
Just drop them.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: Port handler_10 to use QDict
This commit ports command handlers that receive ten arguments to usethe new monitor's dictionary.
monitor: Split monitor_handle_command()
In order to help the integration with unit-tests and having a betterdesign, this commit splits monitor_handle_command() into two parts.
The parsing code is moved to a function called monitor_parse_command(),while allocating memory and calling the handler is still done by...
monitor: Drop unused macros
GET_TLONG() and GET_TPHYSADDR() are not needed anymore, QInt canhandle such conversions.
monitor: Drop str_allocated[]
It's not used anymore, as QDict is now used to handle stringmemory allocation/deallocation.
monitor: Drop args[] handling code
This commit drops all the code used to handle the 'args[]' array,as now we use a dictionary to pass arguments.
monitor: Port handler_1 to use QDict
This commit ports command handlers that receive one argument to usethe new monitor's dictionary.
monitor: Port handler_2 to use QDict
This commit ports command handlers that receive two arguments to usethe new monitor's dictionary.
monitor: Port handler_3 to use QDict
This commit ports command handlers that receive three arguments to usethe new monitor's dictionary.
monitor: Port handler_4 to use QDict
This commit ports command handlers that receive four arguments to usethe new monitor's dictionary.
Note that GET_TLONG() and GET_TPHYSADDR() macros are not used anymore.
monitor: Port handler_5 to use QDict
This commit ports command handlers that receive five arguments to usethe new monitor's dictionary.
monitor: Port handler_6 to use QDict
This commit ports command handlers that receive six arguments to usethe new monitor's dictionary.
monitor: Port handler_7 to use QDict
This commit ports command handlers that receive seven arguments touse the new monitor's dictionary.
monitor: Setup a QDict with arguments to handlers
With this commit monitor_handle_command() will be able to setup aQDict with arguments to command handlers.
However, the current 'args[]' method is still being used, nextchanges will port commands to get their arguments from the dictionary....
monitor: Port handler_0 to use QDict
This commit ports command handlers that receive no arguments to usethe new monitor's dictionary.
It might seem no sense to do this, as the handlers have no arguments,but at the end of this porting work all handlers will have the same...
Add wrappers to functions used by the Monitor
Some functions exported to be used by the Monitor as commandhandlers are also called in other places as regular functions.
When those functions got ported to use the Monitor dictionaryto pass argments, the callers will have to setup a dictionary...
monitor: New format for handlers argument types
Current handlers argument types, as defined in qemu-monitor.hx file,are a sequence of chars where each one represents one argument typeof the command handler. The number of chars is also used to know howmany arguments a given handler accepts....
Fix breakage due to __thread
Thread-local storage is not supported on all hosts.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
add qemu_error() + friends
This patch adds some functions for error reporting to address theproblem that error messages should be routed to different destinationsdepending on the context of the caller, i.e. monitor command errorsshould go to the monitor, command line errors to stderr....
kvm: Simplify cpu_synchronize_state()
cpu_synchronize_state() is a little unreadable since the 'modified'argument isn't self-explanatory. Simplify it by making it alwayssynchronize the kernel state into qemu, and automatically flush theregisters back to the kernel if they've been synchronized on this...
move do_loadvm() to monitor.c
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
make load_vmstate() return errors
Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target. The worst is thatit prevents large memory from working in the default build.
Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on...
Fix device name completion for 'eject'
rename "info qdrv" to "info qdm"
As requested by avi: driver != device model.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-Id:
Fix do_commit() behavior
Commit 751c6a17042b5d011013d6963c0505d671cf708e changed the monitor's'commit' command to this behavior:
1. Any string you type as argument will cause do_commit() tocall bdrv_commit() to all devices
2. If you enter a device name, it will be the only one ignored...
Fix Sparse warnings: "Using plain integer as NULL pointer"
qdev/core: add monitor command to list all drivers
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kill drives_table
First step cleaning up the drives handling. This one does nothing butremoving drives_table[], still it became seriously big.
drive_get_index() is gone and is replaced by drives_get() which handsout DriveInfo pointers instead of a table index. This needs adaption in...
Add getfd and closefd monitor commands
Add monitor commands to support passing file descriptors viaSCM_RIGHTS.
getfd assigns the passed file descriptor a name for use with othermonitor commands.
closefd allows passed file descriptors to be closed. If a monitor...
Add monitor_get_fd() command for fetching named fds
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Add port write command
Useful for testing hardware emulations or manipulating its state tostress guest drivers.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Move boot_set callback backend
Move registration function for the boot_set callback handler and provideqemu_boot_set so that it can also be used outside the monitor code.
use constant IOPORTS_MASK instead of 0xffff.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QEMU: MCE: Add MCE simulation to qemu/tcg
- 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...
monitor: Add completion for help command
monitor: Refactor acl commnds
Refactor the ACL monitor interface to make full use of the monitorcommand dispatcher. This also gives proper help formatting and commandcompletion. Note that 'acl allow' and 'acl deny' were combined to'acl_add aclname match allow|deny [index]' for consistency reasons....
slirp: Add info usernet for dumping connection states
Break out sockstats from the slirp statistics and present them under thenew info category "usernet". This patch also improves the current output/wrt proper reporting connection source and destination....
slirp: Drop statistic code
As agreed on the mailing list, there is no interest in keeping theusually disabled slirp statistics in the tree. So this patch removesthem.
monitor: Introduce get_command_name()
Move code to extract command name into a function of its own, thisclearifies the code and let us remove two variables frommonitor_handle_command().
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor: Remove unused variable
The local pointer 'q' is not used by monitor_handle_command().
monitor: Remove uneeded 'return' statement
The 'return' statement at the of monitor_handle_command() is notneeded and can be removed.
monitor: Remove uneeded goto
The 'found' goto in monitor_handle_command() can be dropped if we checkfor 'cmd->name' after looking up for the command to execute.
Use hxtool to generate monitor documentation and C structures
qdev: add monitor command to dump the tree.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Paul Brook <paul@codesourcery.com>
User networking: Show active connections
In case you're wondering what connections exactly you have openor maybe redir'ed in the past, you can't really find out from qemuright now.
This patch enables you to see all current connections the hostonly networking holds open, so you can kill them using the previous...
User Networking: Enable removal of redirections
Using the new host_net_redir command you can easily create redirectionson the fly while your VM is running.
While that's great, it's missing the removal of redirections, in case youwant to have a port closed again at a later point in time....
Drop CONFIG_GDBSTUB
This is no user-flippable switch, and no arch makes use of disablinggdbstub support. So it's pointless to keep the related #ifdefs andconfigure hunks around - and risking breakages like 711c410fdd again.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Hardware watchdog
Here is an updated hardware watchdog patch, which should fixeverything that was raised about the previous version ...
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Fix warning in do_info_numa (Jan Kiszka)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7232 c046a42c-6fe2-441c-8c8c-71466251a162
add info numa command to monitor (Andre Przywara)
adds an "info numa" command to the monitor to output the currenttopology. Since NUMA is advertised via static ACPI tables, no changes arepossible during runtime.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>...
slirp: Enhance host-guest redirection setup (Jan Kiszka)
Allow to establish a TCP/UDP connection redirection also via a monitorcommand 'host_net_redir'. Moreover, assume TCP as connection type ifthat parameter is omitted.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
monitor: Allow host_net_add/remove for all targets (Jan Kiszka)
There is nothing x86-specific in host_net_add/remove, so allow them forall targets.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
monitor: Improve host_net_add (Jan Kiszka)
Fix the documentation of the host_net_add monitor command and allow theuser to pass no options at all. Moreover, inform the user on themonitor terminal if a request failed.
net: Add support for capturing VLANs (Jan Kiszka)
This patch is derived from Tristan Gingold's patch. It adds a new VLANclient type that writes all traffic on the VLAN it is attached to into apcap file. Such a file can then be analyzed offline with Wireshark or...
kqemu: merge CONFIG_KQEMU and USE_KQEMU
Basically a recursive ":%s/USE_KQEMU/CONFIG_KQEMU/g".
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7189 c046a42c-6fe2-441c-8c8c-71466251a162
monitor: Update command help (Jan Kiszka)
Align some monitor help texts to the related command parameterdefinitions. host_net_add is skipped intentionally, will be slightlyreworked in a separate patch later.
Add --with-pkgversion.Allows distributors to identify their builds without needing to hack thesources.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7036 c046a42c-6fe2-441c-8c8c-71466251a162
Add new command line option -singlestep for tcg single stepping.
This replaces a compile time option for some targets and addsthis feature to targets which did not have a compile time option.
Add monitor command to enable or disable single step mode.
Modify monitor command "info status" to display single step mode....
gdbstub: Rework configuration via command line and monitor (Jan Kiszka)
Introduce a more canonical gdbstub configuration (system emulation only)via the new switch '-gdb dev'. Keep '-s' as shorthand for'-gdb tcp::1234'. Use the same syntax also for the corresponding monitor...
gdbstub: Allow re-instantiation (Jan Kiszka)
[ Note: depends on char closing fixes ]
Properly clean up the gdbstub when the user tries to re-open it(possibly under a different address). Moreover, allow to shut it downfrom the monitor via 'gdbserver none'....
monitor: sync from kvm state before generating output (Jan Kiszka)
Ported from the KVM tree: Synchronize the qemu cpu state with kvm'sbefore invoking various monitor info commands (like 'info registers').
Multi-key completion for sendkey
Allow completion of concatenated key strings for the sendkey command.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6784 c046a42c-6fe2-441c-8c8c-71466251a162
Sparse fixes: NULL use, header order, ANSI prototypes, static
Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162
Remove tabs introduced from VNC ACL series
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6727 c046a42c-6fe2-441c-8c8c-71466251a162
Support ACLs for controlling VNC access ("Daniel P. Berrange")
This patch introduces a generic internal API for access control liststo be used by network servers in QEMU. It adds support for checkingthese ACL in the VNC server, in two places. The first ACL is for the...
monitor: Introduce MONITOR_USE_READLINE flag (Jan Kiszka)
This allows to create monitor terminals that do not make use of theinteractive readline back-end but rather send complete commands. Thepass-through monitor interface of the gdbstub will be an example....
monitor: Improve mux'ed console experience (Jan Kiszka)
Up to now, you never really knew if you already switched the consoleafter pressing CTRL-A C or if you mistyped it again. This patchclarifies the situation by providing a prompt in a new line andinjecting a linebreak when switching away again. For this purpose, the...
monitor: Decouple terminals (Jan Kiszka)
Currently all registered (and activate) monitor terminals work inbroadcast mode: Everyone sees what someone else types on some otherterminal and what the monitor reports back. This model is broken whenyou have a management monitor terminal that is automatically operated...
monitor: Introduce ReadLineState (Jan Kiszka)
As another step towards decoupled monitor terminals encapsulate thestate of the readline processor in a separate data structure calledReadLineState and adapt all interfaces appropriately. For now themonitor continues to instantiate just a single readline state....
monitor: Drop banner hiding (Jan Kiszka)
There is no use for the hide/show banner option, and it is appliedinconsistently anyway (or what makes the difference between -serial mon:stdio and -nographic for the monitor?). So drop this mode.
monitor: Rework terminal management (Jan Kiszka)
Remove the static MAX_MON limit by managing monitor terminals in alinked list.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6712 c046a42c-6fe2-441c-8c8c-71466251a162
monitor: Rework API (Jan Kiszka)
Refactor the monitor API and prepare it for decoupled terminals:term_print functions are renamed to monitor_* and all monitor servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
monitor: Rework modal password input (Jan Kiszka)
Currently, waiting for the user to type in some password blocks thewhole VM because monitor_readline starts its own I/O loop. And this loopalso screws up reading passwords from virtual console.
Patch below fixes the shortcomings by using normal I/O processing also...
monitor: Break out readline_show_prompt (Jan Kiszka)
Break readline_show_prompt out of readline_start so that (re-)printingthe prompt can be controlled in a more fine-grained way.
monitor: Simplify password input mode (Jan Kiszka)
Drop the hack to query passwords on all monitor terminals now that theyare requested when the user initially enters 'continue'.
monitor: Rework early disk password inquiry (Jan Kiszka)
Reading the passwords for encrypted hard disks during early startup isbroken (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...
block: Improve bdrv_iterate (Jan Kiszka)
Make bdrv_iterate more useful by passing the BlockDriverState to theiterator instead of the device name.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6703 c046a42c-6fe2-441c-8c8c-71466251a162
SH4: Added monitoring of TLBs
This patch might interest some people trying (as I try to do) to fixsome tlbs for kernel/user space data sharing.
Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
qemu: PCI device, disk and host network hot-add / hot-remove (Marcelo Tosatti)
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....
Add a description for the set_link monitor command.
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)
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 docs
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....
Add 'set_link' monitor command (Mark McLoughlin)
Add a monitor command to setting a given network device's link statusto '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>...
Fix -Werror=format-security warning (Frederik Himpe/Lennert Buytenhek)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6134 c046a42c-6fe2-441c-8c8c-71466251a162
new monitor func status
Attached is a small patch that adds the new info subcommand - status.
The status indicates if the VM is running or paused this info makeslife 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 6081
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)
This patch adds HPET emulation. It can be disabled with -disable-hpet. An hpetprovides a more finely granular clocksource than otherwise available on PC.This means that latency-dependent applications (e.g. multimedia) will generally...
Accept password as an argument to 'change vnc password' monitor command (Chris Webb)
This allows easier use of the change vnc password monitor command frommanagement scripts, without having to implement expect(1)-like behaviour.
Signed-off-by: Chris Webb <chris@arachsys.com>...
Fix off-by-one bug limiting VNC passwords to 7 chars (Chris Webb)
monitor_readline expects buf_size to include the terminating \0, butdo_change_vnc in monitor.c calls it as though it doesn't. The other sitewhere monitor_readline reads a password (in vl.c) passes the buffer...
Add virtio-balloon support
This adds a VirtIO based balloon driver. It uses madvise() to actually balloonthe memory when possible.
Until 2.6.27, KVM forced memory pinning so we must disable ballooning unless thekernel actually supports it when using KVM. It's always safe when using TCG....
Add ballooning infrastructure.
Balloon devices allow you to ask the guest to allocate memory. This allows youto release that memory. It's mostly useful for freeing up large chunks ofmemory from cooperative guests.
Ballooning is supported by both Xen and VirtIO....
Attached patch fixes a series of this warningwhen 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 QEMU
This patch adds very basic KVM support. KVM is a kernel module for Linux thatallows userspace programs to make use of hardware virtualization support. Itcurrent supports x86 hardware virtualization using Intel VT-x or AMD-V. It...
Implement "info chardev" command. (Gerd Hoffmann)
This patch makes qemu keep track of the character devices in use andimplements a "info chardev" monitor command to print a list.
qemu_chr_open() sticks the devices into a linked list now. It got a newargument (label), so there is a name for each device. It also assigns a...
Fix undeclared symbol warnings from sparse
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
target-ppc: Convert XER accesses to TCG
Define XER bits as a single register and access them individually toavoid defining 5 32-bit registers (TCG doesn't permit to map 8-bitregisters).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5500 c046a42c-6fe2-441c-8c8c-71466251a162
Introduce UI for live migration
This patch introduces a command line parameter and monitor command for startinga live migration. The next patch will provide an example of how to use theseparameters.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...