History | View | Annotate | Download (138.8 kB)
exec: Change cpu_memory_rw_debug() argument to CPUState
Propagate X86CPU in kvmvapic for simplicity.
Signed-off-by: Andreas Färber <afaerber@suse.de>
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.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>...
HMP: delete info handler
Now cmd and info handler have same format, so delete info handler.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
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,...
cpu_dump_state: move DUMP_FPU and DUMP_CCOP flags from x86-only to generic
Move the DUMP_FPU and DUMP_CCOP flags for cpu_dump_state() from beingx86-specific flags to being generic ones. This allows us to drop someTARGET_I386 ifdefs in various places, and means that we can (potentially)...
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'qmp/queue/qmp' into staging
Make target_phys_addr_t 64 bits unconditionally
The hassle and compile time overhead of maintaining both 32-bit and 64-bitcapable source isn't worth the tiny performance advantage which is seen ona minority of configurations. Switch to compiling libhw only once, with...
block: introduce block job error
The following behaviors are possible:
'report': The behavior is the same as in 1.1. An I/O error,respectively during a read or a write, will complete the job immediatelywith an error code.
'ignore': An I/O error, respectively during a read or a write, will be...
monitor: add Error * argument to monitor_get_fd
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>
qapi: convert add_client
Also fixes a few issues while there:
1. The fd returned by monitor_get_fd() leaks in most error conditions 2. monitor_get_fd() return value is not checked. Best case we get an error that is not correctly reported, worse case one of the...
Merge branch 'spice.v59' of git://anongit.freedesktop.org/spice/qemu
monitor: Rename+move net_handle_fd_param -> monitor_handle_fd_param
This patch renames+moves the net_handle_fd_param() caller used toobtain a file descriptor from either qemu_parse_fd() (the normal case)or from monitor_get_fd() (migration case) into a generically prefixed...
qapi: convert sendkey
Convert 'sendkey' to use QAPI.
QAPI passes key's index of mapping table to qmp_send_key(),not keycode. So we use help functions to convert key/code toindex of key_defs, and 'index' will be converted to 'keycode'inside qmp_send_key()....
qapi: convert screendump
Next commits will update devices to propagate errors.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor: rename keyname '<' to 'less'
There are many maps of keycode 0x56 in pc-bios/keymaps/* pc-bios/keymaps/common:less 0x56 pc-bios/keymaps/common:greater 0x56 shift pc-bios/keymaps/common:bar 0x56 altgr pc-bios/keymaps/common:brokenbar 0x56 shift altgr...
hmp: rename arguments
Rename 'string' to 'keys', rename 'hold_time' to 'hold-time'.
Signed-off-by: Amos Kong <akong@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor: move key_defs[] table and introduce two help functions
This patch added two help functions to convert key/code to index ofmapping table, those functions will return Q_KEY_CODE_MAX if thecode/key is invalid.
Patch also moved key_defs[] to input.c, and removed useless KeyDef struct....
spice migration: add QEVENT_SPICE_MIGRATE_COMPLETED
When migrating, libvirt queries the migration status, and upon migrationcompletions, it closes the migration src. On the other hand, whenmigration is completed, spice transfers data from the src to destination...
monitor: don't try to initialize json parser when monitor is HMP
Reported-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: move json init from OPEN event to init
At some point in the past, the OPEN event was changed to be issued from abottom half. This creates a small window whereas a data callback registered ininit may be invoked before the OPEN event has been issued....
monitor: avoid declaring unused variables
Some variables are only used on !win32, declarethem only when used.
This avoids a warning in mingw32 build: CC i386-softmmu/monitor.o/src/qemu/monitor.c: In function 'monitor_fdset_get_fd':/src/qemu/monitor.c:2575: warning: unused variable 'mon_fd_flags'...
block: Enable qemu_open/close to work with fd sets
When qemu_open is passed a filename of the "/dev/fdset/nnn" format (where nnn is the fdset ID), an fd with matching accessmode flags will be searched for within the specified monitorfd set. If the fd is found, a dup of the fd will be returned...
monitor: Clean up fd sets on monitor disconnect
Fd sets are shared by all monitor connections. Fd sets are consideredto be in use while at least one monitor is connected. When the lastmonitor disconnects, all fds that are members of an fd set with no...
qapi: Introduce add-fd, remove-fd, query-fdsets
This patch adds support that enables passing of file descriptorsto the QEMU monitor where they will be stored in specified filedescriptor sets.
A file descriptor set can be used by a client like libvirt to...
qmp: add SUSPEND_DISK event
Emitted when the guest makes a request to enter S4 state.
There are three possible ways of having this event, as described here:
http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg02307.html
I've decided to add a new event and make it indepedent of SHUTDOWN....
qmp: switch to the new error format on the wire
IMPORTANT: this BREAKS QMP's compatibility for the error response.
This commit changes QMP's wire protocol to make use of the simplererror format introduced by previous commits.
There are two important (and mostly incompatible) changes:...
monitor: drop unused monitor debug code
In the old QMP days, this code was used to find out QMP commands thatmight be calling monitor_printf() down its call chain.
This is almost impossible to happen today, because the qapi convertedcommands don't even have a monitor object. Besides, it's been more than...
Add migrate_set_cache_size command
Change XBZRLE cache size in bytes (the size should be a power of 2, it will berounded down to the nearest power of 2).If XBZRLE cache size is too small there will be many cache miss.
New query-migrate-cache-size QMP command and 'info migrate_cache_size' HMP...
Add migration capabilities
The management can query the current migration capabilities usingquery-migrate-capabilities QMP command.The user can use 'info migrate_capabilities' HMP command.Currently only XBZRLE capability is available.
Signed-off-by: Orit Wasserman <owasserm@redhat.com>...
monitor: remove unused do_info_trace
Going forward with simpletrace v2 variable size trace records, we cannothave a generic function to print trace event info and therefore thisinterface becomes invalid.
As per Stefan Hajnoczi:
"This command is only available from the human monitor. It's not very...
monitor: Use TARGET_PRI*PHYS to avoid TARGET_PHYS_ADDR_BITS ifdef
Now we have TARGET_PRI*PHYS for printing target_phys_addr_t values,we can use them in monitor.c rather than having duplicate codein two arms of a TARGET_PHYS_ADDR_BITS ifdef.
qapi: Convert getfd and closefd
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Add rate limiting of RTC_CHANGE, BALLOON_CHANGE & WATCHDOG events
Allow certain event types to be rate limited to avoid floodingmonitor clients. The monitor_protocol_event() method is changedsuch that instead of immediately emitting the event to Monitor...
Add event notification for guest balloon changes
After setting a balloon target value, applications have tocontinually poll 'query-balloon' to determine whether theguest has reacted to this request. The virtio-balloon backendknows exactly when the guest has reacted though, and thus it...
Add 'query-events' command to QMP to query async events
Sometimes it is neccessary for an application to determinewhether a particular QMP event is available, so they candecide whether to use compatibility code instead. Thisintroduces a new 'query-events' command to QMP to do just...