History | View | Annotate | Download (146.1 kB)
monitor: Add device_del id argument completion.
Signed-off-by: Hani Benhabiles <hani@linux.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor: Add device_add device argument completion.
monitor: Add object_del id argument completion.
monitor: Add object_add class argument completion.
exec: Make ldq/ldub_*_phys input an AddressSpace
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-02-02' into staging
trivial patches for 2014-02-02
readline: Add missing GCC_FMT_ATTR
This fixes a compiler warning with -Werror=missing-format-attributeand allows improved compiler checks for variable argument lists.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>...
monitor: Cleanup mon->outbuf on write error
In case monitor_flush() fails to write the contents of mon->outbuf tothe output device, mon->outbuf is not cleaned up properly. Check thereturn code of the qemu_chr_fe_write() function and cleanup the outbufif it fails....
readline: decouple readline from the monitor
Make the readline.c functionality reusable. Instead of callingmonitor_printf() and monitor_flush() directly, invoke function pointersprovided by the user.
This way readline.c does not know about Monitor and other users will be...
readline: move readline to a generic location
Now that the monitor and readline are decoupled, readline.h no longerbelongs in include/monitor/. Put the header into include/qemu/.
Move the source file into util/ so it can be linked as part oflibqemuutil.a....
Merge remote-tracking branch 'agraf/ppc-for-upstream' into staging
ppc: Add CFAR, DAR and DSISR to the dictionary of printable registers
The CFAR, DAR and DSISR registers are currently missing from thedictionary of registers that may be printed in the QEMU console.These are interesting registers when debugging. With this patch,...
monitor: eliminate monitor_event_state_lock
This lock does not protect anything that the BQL does not alreadyprotect. Furthermore, with -nodefaults and no monitor, the mutexis not initialized but monitor_protocol_event_queue is calledanyway, which causes a crash under mingw (and only works by luck....
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings / X86CPU
Merge remote-tracking branch 'kwolf/for-anthony' into staging
cpu: Use QTAILQ for CPU list
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthandmacros.
Signed-off-by: Andreas Färber <afaerber@suse.de>
qcow2: Metadata overlap checks
Two new functions are added; the first one checks a given range in theimage file for overlaps with metadata (main header, L1 tables, L2tables, refcount table and blocks).
The second one should be used immediately before writing to the image...
monitor: split off monitor_data_init()
In qmp_human_monitor_command(), the monitor need to initialized forbasic functionalities, and later more init code will be added, sosplit off this function. Note that it is different with QMP modemonitor which accept json string from monitor's input,...
monitor: avoid direct use of global variable *mon_cmds
New member *cmd_table is added in structure Monitor to avoid direct usage of*mon_cmds. Now monitor have an associated command table, when global variable*info_cmds is also discarded, structure Monitor would gain full control about...
monitor: code move for parse_cmdline()
help_cmd() need this function later, so move it. get_str() is called byparse_cmdline() so it is moved also. Some code style error reported bycheck script, is also fixed.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>...
monitor: refine parse_cmdline()
Since this function will be used by help_cmd() later, so improveit to make it more generic and easier to use. free_cmdline_args()is added too as paired function to free the result.
One change of this function is that, when the valid args in input...
monitor: support sub command in help
The old code in help_cmd() uses global 'info_cmds' and treats it as aspecial case. Actually 'info_cmds' is a sub command group of 'mon_cmds',in order to avoid direct use of it, help_cmd() needs to change its workmechanism to support sub command and not treat it as a special case...
monitor: refine monitor_find_completion()
In order to support sub command in auto completion, a reentrant functionis needed, so monitor_find_completion() is split into two parts. Thefirst part does parsing of user input which need to be done only once,...
monitor: support sub command in auto completion
This patch allows auto completion work normal for sub command case,"info block [DEVICE]" can auto complete now, by re-enter the completionfunction. In original code "info" is treated as a special case, now it...
monitor: allow "help" show message for single command in sub group
A new parameter type 'S' is introduced to allow user input any string."help info block" works normal now.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
monitor: improve auto complete of "help" for single command in sub group
Now special case "help " in auto completion can work with sub commands,such as "help info u".
monitor: Add missing attributes to local function
Function expr_error gets a format string and variable arguments like printf.It also never returns. Add the necessary attributes.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor: avoid use of global *cur_mon in cmd_completion()
A new local variable *mon is added in monitor_find_completion()to make compile pass, which will be removed later inconversion patch for monitor_find_completion().
monitor: avoid use of global *cur_mon in file_completion()
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor: avoid use of global *cur_mon in block_completion_it()
monitor: avoid use of global *cur_mon in monitor_find_completion()
Parameter *mon is added, and local variable *mon added in previous patchis removed. The caller readline_completion(), pass rs->mon as value, whichshould be initialized in readline_init() called by monitor_init()....
monitor: call sortcmdlist() only one time
It doesn't need to be done for every monitor, so change it.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Merge remote-tracking branch 'stefanha/block' into staging
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api.
Switch the entire code base to using the new timer API.
Note this patch may introduce some line length issues.
Signed-off-by: Alex Bligh <alex@alex.org.uk>...
monitor: print the invalid char in error message
It's more friendly to print which char is invalid to user, especiallywhen user tries to input a float value and expect the monitor to roundit to int. Since we don't round float number when we look for a integer,...
exec: Change cpu_memory_rw_debug() argument to CPUState
Propagate X86CPU in kvmvapic for simplicity.
monitor: maintain at most one G_IO_OUT watch
When monitor_flush() is invoked repeatedly outside the monitor_unblocked()callback, for example from tlb_info() -> ... -> print_pte(), severalwatches may be added for the same event.
This is no problem per se because the extra monitor_unblocked() callbacks...
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci,net,pc enhancements
This includes some fixes and enhancements that accumulated in my tree:pci fixes by dkoch, virtio-net enhancements by akong and mst,and a fix for xen pc by mst.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
net: add support of mac-programming over macvtap in QEMU side
Currently macvtap based macvlan device is working in promiscuousmode, we want to implement mac-programming over macvtap throughLibvirt for better performance.
Design: QEMU notifies Libvirt when rx-filter config is changed in guest,...
cpu: Make first_cpu and next_cpu CPUState
Move next_cpu from CPU_COMMON to CPUState.Move first_cpu variable to qom/cpu.h.
gdbstub needs to use CPUState::env_ptr for now.cpu_copy() no longer needs to save and restore cpu_next.
Acked-by: Paolo Bonzini <pbonzini@redhat.com>...
kvm: Change cpu_synchronize_state() argument to CPUState
Change Monitor::mon_cpu to CPUState as well.
Reviewed-by: liguang <lig.fnst@cn.fujitsu.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks
Make cpustats monitor command available unconditionally.
Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()arguments to CPUState.
monitor: Simplify do_inject_mce() with qemu_get_cpu()
Avoids an open-coded CPU loop.
Reviewed-by: liguang <lig.fnst@cn.fujitsu.com>Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
hmp: add parameters device and -v for info block
With these parameters, user can choose the information to be showed,to avoid message flood in the monitor.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
cutils: Support 'P' and 'E' suffixes in strtosz()
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
do not check pointers after dereferencing them
Two instances, both spotted by Coverity. In one, two blocks wereswapped. In the other, the check is not needed anymore.
Cc: qemu-stable@nongnu.orgCc: qemu-trivial@nongnu.orgSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>...
remove some double-includes
Some source files #include the same header more thanonce for no good reason. Remove second #includes insuch cases.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
add a new qevent: QEVENT_GUEST_PANICKED
This event will be emited when qemu detects guest panic.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Message-id: cf0bc45ecf9ecd3699bc72dc39f8cbab8ed79d8c.1366945969.git.hutao@cn.fujitsu.com...
audio: remove HAS_AUDIO
Several targets can have wavcapture/-soundhw support via PCI cards.HAS_AUDIO is a useless limitation, remove it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1366303444-24620-4-git-send-email-pbonzini@redhat.com...
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
tpm: reorganize headers and split hardware part
The TPM subsystem does not have a full front-end/back-end separation.The sole available backend, tpm_passthrough, depends on the datastructures of the sole available frontend, tpm_tis.
However, we can at least try to split the user interface (tpm.c) from the...
sysemu: avoid proliferation of include/ subdirectories
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Revert "New QMP command query-cpu-max and HMP command cpu_max"
This reverts commit 4d700430a20b3d53b7b15bc5f6666f7e570e3f2c as asked byLuiz. The patch has been obsoleted by extending MachineInfo structureby cpu-max field.
Signed-off-by: Michal Novotny <minovotn@redhat.com>...
hw: move headers to include/
Many of these should be cleaned up with proper qdev-/QOM-ification.Right now there are many catch-all headers in include/hw/ARCH dependingon cpu.h, and this makes it necessary to compile these files per-target.However, fixing this does not belong in these patches....
Monitor: Make output buffer dynamic
Commit f628926bb423fa8a7e0b114511400ea9df38b76a changed monitor_flush()to retry on qemu_chr_fe_write() errors. However, the Monitor's outputbuffer can keep growing while the retry is not issued and this cancause the buffer to overflow....
hmp: human-monitor-command: stop using the Memory chardev driver
The Memory chardev driver was added because, as the Monitor's outputbuffer was static, we needed a way to accumulate the output of anHMP commmand when ran by human-monitor-command.
However, the Monitor's output buffer is now dynamic, so it's possible...
trace: [monitor] Use new event control interface
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
virtio,pci,qom
Work by Alex to support VGA assignment,pci and virtio fixes by Stefan, Jason and myself, and anew qmp event for hotplug support by myself.
New QMP command query-cpu-max and HMP command cpu_max
These commands return the maximum number of CPUs supported by thecurrently running emulator instance, as defined in its QEMUMachinestruct.
Signed-off-by: Michal Novotny <minovotn@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Merge branch 'ppc-for-upstream' of git://github.com/agraf/qemu
target-ppc: Remove vestigial PowerPC 620 support
The PowerPC 620 was the very first 64-bit PowerPC implementation, buthardly anyone ever actually used the chips. qemu notionally supports the620, but since we don't actually have code to implement the segment table,...
Fix typos and misspellings
Fix various typos and misspellings. The bulk of these were found withcodespell.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
fix monitor
chardev flow control broke monitor, fix it by adding watch support.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: DEVICE_DELETED event
libvirt has a long-standing bug: when removing the device,it can request removal but does not know when theremoval completes. Add an event so we can fix this in a robust way.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
Support for TPM command line options
This patch adds support for TPM command line options.The command line options supported here are
./qemu-... -tpmdev passthrough,path=<path to TPM device>,id=<id> -device tpm-tis,tpmdev=<id>,id=<other id>...
monitor: Use qemu_get_cpu() in monitor_set_cpu()
No functional change, just a reduction of CPU loops.
The mon_cpu field is left untouched for now since changing that requiresa number of larger prerequisites, including cpu_synchronize_state() andmon_get_cpu()....
hw: move qdev-monitor.o to toplevel directory
qdev-monitor.c is the only "core qdev" file that is not used inuser-mode emulation, and it does not define anything that is usedby hardware models. Remove it from the hw/ directory andremove hw/qdev-monitor.h from hw/qdev.h too; this requires...
Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp()
The setjmp() function doesn't specify whether signal masks are saved andrestored; on Linux they are not, but on BSD (including MacOSX) they are.We want to have consistent behaviour across platforms, so we should...
qemu-log: Rename CPULogItem, cpu_log_items to QEMULogItem, qemu_log_items
Rename the typedef CPULogItem and the public array cpu_log_itemsto names that better reflect the fact that the qemu_log functionalityisn't restricted to TCG CPU debug logs any more....
qemu-log: Rename the public-facing cpu_set_log function to qemu_set_log
Rename the public-facing function cpu_set_log to qemu_set_log. Thisrequires us to rename the internal-only qemu_set_log() todo_qemu_set_log().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
qemu-log: Rename cpu_str_to_log_mask to qemu_str_to_log_mask
Rename cpu_str_to_log_mask() to qemu_str_to_log_mask(), sincethe qemu_log functionality is no longer restricted to TCG CPUdebug logging.
qemu-log: Unify {cpu_set,set_cpu}_log_filename as qemu_set_log_filename
The qemu_log() functionality is no longer specific to TCG CPU debug logs.Rename cpu_set_log_filename() to qemu_set_log_filename() and drop thepointless wrapper set_cpu_log_filename()....
HMP: add QDict to info callback handler
This patch change all info call back function to takeadditional QDict * parameter, which allow those commandtake parameter. Now it is set to NULL at default case.
HMP: delete info handler
Now cmd and info handler have same format, so delete info handler.
HMP: add infrastructure for sub command
This patch make parsing of hmp command aware of that it mayhave sub command. Also discard simple encapsulation functionmonitor_find_command(). For case "@command ", space after@command is filtered out.
HMP: move define of mon_cmds
Because mon_cmds may use info_cmds, so adjust the declare sequenceof them.
HMP: add sub command table to info
Now info command takes a table of sub info commands,and changed do_info() to do_info_help() to do help funtiononly. Note that now "info <unknown-topic>" returns error insteadof list of info topics.
cpu: Move numa_node field to CPUState
cpu: Move cpu_index field to CPUState
Note that target-alpha accesses this field from TCG, now using anegative offset. Therefore the field is placed last in CPUState.
Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.
Move common parts of mips cpu_state_reset() to mips_cpu_reset()....
Merge remote-tracking branch 'bonzini/stub' into staging
qemu-option: move standard option definitions out of qemu-config.c
monitor: assert monitor_puts()'s loop invariant
Chiefly to hush up Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
softmmu: move remaining include files to include/ subdirectories
softmmu: move include files to include/sysemu/
misc: move include files to include/qemu/
monitor: move include files to include/monitor/
migration: move include files to include/migration/
qapi: move include files to include/qobject/
exec: move include files to include/exec/
ui: move files to ui/ and include/ui/
net: reorganize headers
Move public headers to include/net, and leave private headers in net/.Put the virtio headers in include/net/tap.h, removing the multiple copiesthat existed. Leave include/net/tap.h as the interface for NICs, andnet/tap_int.h as the interface for OS-specific parts of the tap backend....
build: kill libdis, move disassemblers to disas/
pci: update all users to look in pci/
update all users so we can remove the makefile hack.
target-i386: Pass X86CPU to cpu_x86_inject_mce()
Needed for changing run_on_cpu() argument to CPUState.
monitor: Allow add-fd to any specified fd set
The first call to add an fd to an fd set was previously notallowed to choose the fd set ID. The ID was generated asthe first available and ensuing calls could add more fds byspecifying the fd set ID. This change allows users to...
monitor: Enable adding an inherited fd to an fd set
qmp_add_fd() gets an fd that was received over a socket withSCM_RIGHTS and adds it to an fd set. This patch adds supportthat will enable adding an fd that was inherited on thecommand line to an fd set....
monitor: Prevent removing fd from set during init
If an fd is added to an fd set via the command line, and it is notreferenced by another command line option (ie. -drive), then cleanit up after QEMU initialization is complete.
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>...
block: introduce BLOCK_JOB_READY event
Even for jobs that need to be manually completed, management may wantto take care itself of the completion, not requiring the user to issuea command to terminate the job. In this case we want to avoid thatthey poll us continuously, waiting for completion to become available....
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...