History | View | Annotate | Download (109 kB)
net: move slirp code from net.c to net/slirp.c
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QMP: Introduce basic asynchronous events
Debug, shutdown, reset, powerdown and stop are all basic events,as they are very simple they can be added in the same commit.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QMP: Disable monitor print functions
We still have handlers which will call monitor print functionsin several places. Usually to report errors.
If they do this when we are in control mode, we will be emittinggarbage to our clients.
To avoid this problem, this commit adds a way to disable those...
QMP: Output support
In the new Monitor output is always performed by only twofunctions: do_info() and monitor_call_handler().
To support QMP output, we modify those functions to check if weare in control mode. If so, we call monitor_protocol_emitter()...
QMP: do_info() checks
This commit adds specific QMP checks to do_info(), so thatit behaves as expected in QMP mode.
QMP: Input support
The JSON stream parser is used to do QMP input. When thereare enough characters to be parsed it calls Monitor'shandle_qmp_command() function to handle the input.
This function's job is to check if the input is correct andcall the appropriate handler. In other words, it does for QMP...
QMP: Allow 'query-' commands
The 'info' command makes sense for the user protocol, but for QMPit doesn't, as its return data is not well defined. That is, itcan return anything.
To fix this Avi proposes having 'query-' commands when in protocolmode. For example, 'info balloon' would become 'query-balloon'....
QMP: Asynchronous events infrastructure
Asynchronous events are generated with a call tomonitor_protocol_event().
This function builds the right data-type and emit the eventright away. The emitted data is always a JSON object and itsformat is as follows:...
monitor: Introduce monitor_find_command()
This commit moves the loop which searches for the commandentry corresponding to a command name to its own function.
It will be used by QMP code as well.
monitor: Rename monitor_handle_command()
As this series will add a new kind of Monitor command, it's betterto rename monitor_handle_command() to what it really is:handle_user_command().
This will avoid confusion.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: Introduce 'info commands'
List QMP available commands. Only valid in control mode, wherehas to be used as 'query-commands.
QMP: Initial support
This commit adds initial QMP support in QEMU. It's importantto notice that most QMP code will be part of the Monitor.
Input will be read by monitor_control_read(). Currently itdoes nothing but next patches will add proper input support....
monitor: do_info_balloon(): Use QError
monitor: Introduce MONITOR_USE_CONTROL flag
This flag will be set when Monitor enters "control mode", inwhich the output will be defined by the QEMU Monitor Protocol.
This also introduces a macro to check if the flag is set.
monitor: Command-line flag to enable control mode
This commit adds a flag called 'control' to the '-monitor'command-line option. This flag enables control mode.
The syntax is:
qemu [...] -monitor control,<device>
Where <device> is a chardev (excluding 'vc', for obvious reasons)....
monitor: Introduce monitor_call_handler()
This commit moves the code which calls Monitor handlers toits own function, as it will be used by QMP code as well.
monitor: QError support
This commit adds QError support in the Monitor.
A QError member is added to the Monitor struct. This new memberstores error information and is also used to check if an errorhas occurred when the called handler returns.
Additionally, a new macro called qemu_error_new() is introduced....
Enable migration without shared storage from the monitor
This patch adds the option to activate non-shared storage migration from themonitor.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...
Configurable block format whitelist
We have code for a quite a few block formats. While I trust that allof these formats are useful at least for some people in somecircumstances, some of them are of a kind that friends don't letfriends use in production....
monitor: Convert do_eject() to QObject
Note that errors are not being converted yet.
monitor: Convert do_getfd() to QObject
monitor: Convert do_closefd() to QObject
monitor: Convert do_memory_save() to QObject
monitor: Convert do_physical_memory_save() to QObject
char: rename CHR_EVENT_RESET to CHR_EVENT_OPENED
The char event RESET is emitted when a char device is opened.Give it a better name.
Patchworks-ID: 35287Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_quit() do QObject
Patchworks-ID: 35345Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_stop() to QObject
Patchworks-ID: 35343Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_system_reset() to QObject
Patchworks-ID: 35347Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_system_powerdown() to QObject
Patchworks-ID: 35346Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_cont() to QObject
Appropriate error handling support will be needed to haveencrypted images working under the future machine protocol,but this initial conversion will work with the currentuser protocol.
Patchworks-ID: 35348Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: Convert do_balloon() to QObject
It is important to note that it never fails, as big refactoringof the virtio code would be needed to get the proper error code.
Patchworks-ID: 35349Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Convert do_info_version() to QObject
The returned data is always a QString.
Also introduces monitor_print_qobject(), which can be used asa standard way to print QObjects in the user protocol format.
Patchworks-ID: 35350Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: Convert do_info_balloon() to QObject
On success return a QInt with the balloon's value.
This also introduces monitor_print_balloon() to print theballoon information in the user protocol.
Please, note that errors are not being converted yet.
Patchworks-ID: 35351...
monitor: Convert do_info_cpus() to QObject
Each CPU information is stored in a QDict and the returnedQObject is a QList of all CPUs.
The QDict contains the following information:
- "CPU": cpu index- "current": "yes" or "no" - "pc": current PC- "halted": "yes" or "no"...
monitor: Convert mon_cmd_t initializations to C99 style
Patchworks-ID: 35335Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: union for info handlers
This commit adds a union to mon_cmd_t for info handlers andconverts do_info() and info_cmds[] array to use it.
This improves type safety.
Next commit will convert command handlers.
Patchworks-ID: 35336Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: union for command handlers
This commits adds a new union member to mon_cmd_t for commandhandlers and convert monitor_handle_command() and qemu-monitor.hxto use it.
Patchworks-ID: 35337Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
monitor: Add user_print() to mon_cmd_t
This new struct member will store a pointer to a function thatshould be used to output data in the user protocol format.
It will also serve as a flag to say if a given handler has alreadybeen converted to the new QObject style....
monitor: Handle new and old style handlers
This commit changes monitor_handle_command() to support old styleand new style handlers.
New style handlers are protocol independent, they return theirdata to the Monitor, which in turn decides how to print them...
monitor: do_info(): handle new and old info handlers
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 andold style info handlers.
This commit converts do_info() to the new QObject style and...
Reorganize option rom (+linux kernel) loading.
This patch adds infrastructure to maintain memory regions which must berestored on reset. That includes roms (vga bios and option roms on pc),but is also used when loading linux kernels directly. Features:...
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
Fix build with profiler enabled
Broken by 4a1418e07bdcfaa3177739e04707ecaec75d89e1
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
ioports: remove unused env parameter and compile only once
The CPU state parameter is not used, remove it and adjust callers. Now wecan compile ioport.c once for all targets.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: fix muxing
make the mux driver send mux_in and mux_out events when switchingfocus while hooking up more handlers.
stop using CharDriverState->focus in monitor.c, track state usingthe mux events instead. This also removes the implicit assumtion...
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
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.
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.
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
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
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