aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-06-11curl: Whitespace only changes.Richard W.M. Jones
Trivial patch to remove odd whitespace. Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11intc/xilinx_intc: Use qemu_set_irqPeter Crosthwaite
Use qemu_set_irq rather than if-elsing qemu_irq_(lower|raise). No functional change, just reduces verbosity. Cc: qemu-trivial@nongnu.org Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11configure: Disable host-bsd USB on FreeBSDEd Maste
It hasn't built since FreeBSD 8.x, and is disabled by a patch in the FreeBSD ports tree. FreeBSD is migrating to QEMU's libusb support. Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11configure: remove ${config_host_ld} variableEd Maste
It was only used in one place (and already expanded in one other). Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11gitignore: unignore *.patchMichael Tokarev
This partially reverts: commit 082369e62c5bbaba89f173c2b803bc24115bb111 Author: liguang <lig.fnst@cn.fujitsu.com> Date: Fri Mar 22 16:44:13 2013 +0800 gitignore: ignore more files I'm not sure how this went in. The thing is that ignoring *.patch, in my opinion, is just wrong. Especially for downstreams who apply patches for real. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11qemu-char: remove a few needless #includesMichael Tokarev
This removes <syslog.h> since we don't use syslogging, and removes second, solaris-specific, include of <net/if.h> (which is included in a common part of the file) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-11memory_mapping: Improve qemu_get_guest_memory_mapping() error reportingAndreas Färber
Pass any Error out into dump_init() and have it actually stop on errors. Whether it is unsupported on a certain CPU can be checked by looking for a NULL CPUClass::get_memory_mapping field. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> [AF: Reverted changes to CPU loops] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11dump: Abstract dump_init() with cpu_synchronize_all_states()Andreas Färber
Instead of calling cpu_synchronize_state() for each CPU, call the existing cpu_synchronize_all_states() helper. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11cpu: Change default for CPUClass::get_paging_enabled()Andreas Färber
qemu_get_guest_memory_mapping() uses cpu_paging_enabled() to determine whether to use cpu_get_memory_mapping() to return mappings or whether to fall back to a simple identity map. Since by default CPUClass::get_memory_mapping() is not implemented, change the default to false to use the identity map by default. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11dump: Drop qmp_dump_guest_memory() stub and build for all targetsAndreas Färber
qmp_dump_guest_memory() calls dump_init() and returns an Error when cpu_get_dump_info() returns an error, as done by the stub. So there is no need to have a stub for qmp_dump_guest_memory(). Enable the documentation of the always-present dump-guest-memory command. That way we can drop CONFIG_HAVE_CORE_DUMP and leave configure completely out of the picture for target CPU features. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11memory_mapping: Drop qemu_get_memory_mapping() stubAndreas Färber
dump.c:dump_init() never checked for the return code anyway. If paging is not enabled, it will fall back to an identity map. If paging is enabled and getting memory mapping list is not implemented, qemu_get_guest_memory_mapping() will return an error. Since the targets not implementing memory mapping also don't implement dump support, we will not reach this code today and can worry about changing cpu_paging_enabled() default when the need arises. This allows us to drop CONFIG_HAVE_GET_MEMORY_SUPPORT. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11cpu: Turn cpu_get_memory_mapping() into a CPUState hookAndreas Färber
Change error reporting from return value to Error argument. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> [AF: Fixed cpu_get_memory_mapping() documentation] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11memory_mapping: Move MemoryMappingList typedef to qemu/typedefs.hAndreas Färber
This will avoid issues with hwaddr and ram_addr_t when including sysemu/memory_mapping.h for CONFIG_USER_ONLY, e.g., from qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11cpu: Turn cpu_paging_enabled() into a CPUState hookAndreas Färber
Relocate assignment of x86 get_arch_id to have all hooks in one place. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-11monitor: Simplify do_inject_mce() with qemu_get_cpu()Andreas Färber
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>
2013-06-10target-i386: cpu: Fix potential buffer overrun in get_register_name_32()Igor Mammedov
Spotted by Coverity, x86_reg_info_32[] is CPU_NB_REGS32 elements long, so accessing x86_reg_info_32[CPU_NB_REGS32] will be one element off array. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: liguang <lig.fnst@cn.fujitsu.com> Reviewed by: Jesse Larrew <jlarrew@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-10target-i386: Set level=4 on Conroe/Penryn/NehalemEduardo Habkost
The CPUID level value on Conroe, Penryn, and Nehalem are too low. This causes at least one known problem: the -smp "threads" option doesn't work as expect if level is < 4, because thread count information is provided to the guest on CPUID[EAX=4,ECX=2].EAX Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-10target-i386: Update model values on Conroe/Penryn/Nehalem CPU modelsEduardo Habkost
The CPUID model values on Conroe, Penryn, and Nehalem are too conservative and don't reflect the values found on real Conroe, Penryn, and Nehalem CPUs. This causes at least one known problems: Windows XP disables sysenter when (family == 6 && model <= 2), but Skype tries to use the sysenter instruction anyway because it is reported as available on CPUID, making it crash. This patch sets appropriate model values that correspond to real Conroe, Penryn, and Nehalem CPUs. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-10pc: Create pc-*-1.6 machine-typesEduardo Habkost
Some CPU model fixes are going to be included and they will require compatibility properties in the pc-*-1.5 machine-types. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-10pc: Fix crash when attempting to hotplug CPU with negative IDIgor Mammedov
QMP command "{ 'execute': 'cpu-add', 'arguments': { 'id': -1 }}" may cause QEMU SIGSEGV at: piix4_cpu_hotplug_req () ... g->sts[cpu_id / 8] |= (1 << (cpu_id % 8)); ... Since for PC in current implementation id should be in range [0...maxcpus) and maxcpus is already checked, add check for lower bound and error out on incorrect value. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-10dump: Move stubs into libqemustub.aAndreas Färber
This allows us to drop CONFIG_NO_CORE_DUMP with its indirect dependency on CONFIG_HAVE_CORE_DUMP. Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-10qemu-char: don't issue CHR_EVENT_OPEN in a BHMichael Roth
When CHR_EVENT_OPENED was initially added, it was CHR_EVENT_RESET, and it was issued as a bottom-half: 86e94dea5b740dad65446c857f6959eae43e0ba6 Which we basically used to print out a greeting/prompt for the monitor. AFAICT the only reason this was ever done in a BH was because in some cases we'd modify the chr_write handler for a new chardev backend *after* the site where we issued the reset (see: 86e94d:qemu_chr_open_stdio()) At some point this event was renamed to CHR_EVENT_OPENED, and we've maintained the use of this BH ever since. However, due to 9f939df955a4152aad69a19a77e0898631bb2c18, we schedule the BH via g_idle_add(), which is causing events to sometimes be delivered after we've already begun processing data from backends, leading to: known bugs: QMP: session negotation resets with OPENED event, in some cases this is causing new sessions to get sporadically reset potential bugs: hw/usb/redirect.c: can_read handler checks for dev->parser != NULL, which may be true if CLOSED BH has not been executed yet. In the past, OPENED quiesced outstanding CLOSED events prior to us reading client data. If it's delayed, our check may allow reads to occur even though we haven't processed the OPENED event yet, and when we do finally get the OPENED event, our state may get reset. qtest.c: can begin session before OPENED event is processed, leading to a spurious reset of the system and irq_levels gdbstub.c: may start a gdb session prior to the machine being paused To fix these, let's just drop the BH. Since the initial reasoning for using it still applies to an extent, work around that by deferring the delivery of CHR_EVENT_OPENED until after the chardevs have been fully initialized, toward the end of qmp_chardev_add() (or some cases, qemu_chr_new_from_opts()). This defers delivery long enough that we can be assured a CharDriverState is fully initialized before CHR_EVENT_OPENED is sent. Also, rather than requiring each chardev to do an explicit open, do it automatically, and allow the small few who don't desire such behavior to suppress the OPENED-on-init behavior by setting a 'explicit_be_open' flag. We additionally add missing OPENED events for stdio backends on w32, which were previously not being issued, causing us to not recieve the banner and initial prompts for qmp/hmp. Reported-by: Stefan Priebe <s.priebe@profihost.ag> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Message-id: 1370636393-21044-1-git-send-email-mdroth@linux.vnet.ibm.com Cc: qemu-stable@nongnu.org Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-10Merge remote-tracking branch 'luiz/queue/qmp' into stagingAnthony Liguori
# By Luiz Capitulino (2) and Marcelo Tosatti (1) # Via Luiz Capitulino * luiz/queue/qmp: correct RTC_CHANGE_EVENT description (v2) MAINTAINERS: split Monitor (QMP/HMP) entry MAINTAINERS: new maintainers for qapi-schema.json Message-id: 1370634855-18337-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-10Merge remote-tracking branch 'stefanha/net' into stagingAnthony Liguori
# By Jason Wang (1) and Stefan Hajnoczi (1) # Via Stefan Hajnoczi * stefanha/net: tap: fix NULL dereference when passing invalid parameters to tap vmxnet3: fix NICState cleanup Message-id: 1370613288-14933-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-10gtk: use better iconAnthony Liguori
The current icon looks pretty terrible rendered in Gnome. This switches to a transparent SVG which looks much nicer. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-10softfloat: Fix shift128Right for shift counts 64..127Peter Maydell
shift128Right would give the wrong result for a shift count between 64 and 127. This was never noticed because all of our uses of this function are guaranteed not to use shift counts in this range. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1370186269-24353-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-10gdbstub: let the debugger resume from guest panicked statePaolo Bonzini
While in general we forbid a "continue" from the guest panicked state, it makes sense to have an exception for that when continuing in the debugger. Perhaps the guest entered that state due to a bug, for example, and we want to continue no matter what. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Message-id: 1370272015-9659-3-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-10gdbstub: fix for commit 87f25c12bfeaaa0c41fb857713bbc7e8a9b757dcPaolo Bonzini
This commit used the wrong check to prevent an assertion failure. After this commit, you need to start a guest in the monitor, you cannot use anymore the "c" command in the debugger. This is undesirable. The commit's aim was to prevent a restart after a KVM internal error or something like that; use runstate_needs_reset() for that. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Message-id: 1370272015-9659-2-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-10xilinx_axidma: Do not set DMA .notify to NULL after notifyWendy Liang
If a stream notify function is not ready, it may re-populate the notify call- back to indicate it should be re-polled later. This break in this usage, as immediately following the notify() call, .notify is set to NULL. reverse the ordering of the notify call and NULL assignment accordingly. [PC: Reworked commit message] Signed-off-by: Wendy Liang <jliang@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-06-10xilinx_axienet: Fix bit mask codeStefan Weil
Obviously the code wanted to mask the lower bits but failed to do so because of a missing "<". cppcheck detected a conditional expression which was always true (1 < 7). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-06-07correct RTC_CHANGE_EVENT description (v2)Marcelo Tosatti
Fix RTC_CHANGE event description to match implementation. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-06-07MAINTAINERS: split Monitor (QMP/HMP) entryLuiz Capitulino
This entry doesn't reflect reality for a few years now. This commit splits it into Human Monitor (HMP), QAPI and QMP. Markus is dropped as a maintainer. This is what we have been for the last few years. Also, it's going to help me to offload some of this work to someone else in the near future. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com>
2013-06-07MAINTAINERS: new maintainers for qapi-schema.jsonLuiz Capitulino
I'm facing two problems lately wrt QMP patch review: increasingly lack of bandwidth and lack of background in so many different areas that are getting new QMP commands almost every week. In order to help me mitigate this problem, I'm adding Eric and Markus (besides me) as maintainers of the qapi-schema.json file. Markus has been an old timer reviewer. Eric is being the most active and prolific reviewer of QMP patches for some time now. I believe Markus and Eric will keep doing their work as before, but starting now I'll require the ACK of at least one of them before appling a patch/series that touches the qapi-schema.json file. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com>
2013-06-07tap: fix NULL dereference when passing invalid parameters to tapJason Wang
This patch forbid the following invalid parameters to tap: 1) fd and vhostfds were specified but vhostfd were not specified 2) vhostfds were specified but fds were not specified 3) fds and vhostfd were specified For 1 and 2, net_init_tap_one() will still pass NULL as vhostfdname to monitor_handle_fd_param(), which may crash the qemu. Also remove the unnecessary has_fd check. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Stefan Hajnoczi <shajnocz@redhat.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-07Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori
# By Kevin Wolf (19) and others # Via Stefan Hajnoczi * stefanha/block: (26 commits) hmp: add parameters device and -v for info block hmp: show ImageInfo in 'info block' qmp: add ImageInfo in BlockDeviceInfo used by query-block block: add image info query function bdrv_query_image_info() block: add snapshot info query function bdrv_query_snapshot_info_list() ide-test: Add FLUSH CACHE test case ide: Set BSY bit during FLUSH ide-test: Add enum value for DEV blkdebug: Add BLKDBG_FLUSH_TO_OS/DISK events Make qemu-io commands available in HMP qemu-io: Use the qemu version for -V qemu-io: Interface cleanup qemu-io: Move remaining helpers from cmd.c qemu-io: Move command_loop() and friends qemu-io: Move functions for registering and running commands qemu-io: Move qemu_strsep() to cutils.c qemu-io: Move 'quit' function qemu-io: Move 'help' function qemu-io: Factor out qemuio_command qemu-io: Split off commands to qemu-io-cmds.c ... Message-id: 1370606325-10680-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-07Merge remote-tracking branch 'cohuck/virtio-ccw-upstr' into stagingAnthony Liguori
# By Cornelia Huck # Via Cornelia Huck * cohuck/virtio-ccw-upstr: virtio-ccw: Fix unsetting of indicators. s390x/css: Fix concurrent sense. Message-id: 1370592676-22532-1-git-send-email-cornelia.huck@de.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-07hmp: add parameters device and -v for info blockWenchao Xia
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>
2013-06-07hmp: show ImageInfo in 'info block'Wenchao Xia
Now human monitor can show image details, include internal snapshot and backing chain info for every block device. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-07qmp: add ImageInfo in BlockDeviceInfo used by query-blockWenchao Xia
Now image info will be retrieved as an embbed json object inside BlockDeviceInfo, backing chain info and all related internal snapshot info can be got in the enhanced recursive structure of ImageInfo. New recursive member *backing-image is added to reflect the backing chain status. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-07block: add image info query function bdrv_query_image_info()Wenchao Xia
This patch adds function bdrv_query_image_info(), which will retrieve image info in qmp object format. The implementation is based on the code moved from qemu-img.c, but uses block layer function to get snapshot info. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-07block: add snapshot info query function bdrv_query_snapshot_info_list()Wenchao Xia
This patch adds function bdrv_query_snapshot_info_list(), which will retrieve snapshot info of an image in qmp object format. The implementation is based on the code moved from qemu-img.c with modification to fit more for qmp based block layer API. Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06ide-test: Add FLUSH CACHE test caseKevin Wolf
This checks in particular that BSY is set while the flush request is in flight. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06ide: Set BSY bit during FLUSHAndreas Färber
The implementation of the ATA FLUSH command invokes a flush at the block layer, which may on raw files on POSIX entail a synchronous fdatasync(). This may in some cases take so long that the SLES 11 SP1 guest driver reports I/O errors and filesystems get corrupted or remounted read-only. Avoid this by setting BUSY_STAT, so that the guest is made aware we are in the middle of an operation and no ATA commands are attempted to be processed concurrently. Addresses BNC#637297. Suggested-by: Gonglei (Arei) <arei.gonglei@huawei.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06ide-test: Add enum value for DEVKevin Wolf
Get rid of the magic number. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06blkdebug: Add BLKDBG_FLUSH_TO_OS/DISK eventsKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06Make qemu-io commands available in HMPKevin Wolf
It was decided to not make this command available in QMP in order to make clear that this is not supposed to be a stable API and should be used only for testing and debugging purposes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06qemu-io: Use the qemu version for -VKevin Wolf
Always printing 0.0.1 and never updating the version number wasn't very useful. qemu-io is released with qemu, so using the same version number makes most sense. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06qemu-io: Interface cleanupKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06qemu-io: Move remaining helpers from cmd.cKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-06-06qemu-io: Move command_loop() and friendsKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>