summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-11-06maint: Ignore ivshmem binariesEric Blake1-0/+2
Commit a75eb03b added ivshmem-client and ivshmem-server binaries, but did not mark them for exclusion in .gitignore. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-11-06hw/display/tcx: Remove superfluous OBJECT() typecastsThomas Huth1-14/+12
The tcx_initfn() function is already supplied with an Object *obj pointer, so there is no need to cast the state pointer back to an Object pointer all over the place. And while we're at it, also remove the superfluous "return;" statement in this function. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-11-06gdbstub: Fix buffer overflows in gdb_handle_packet()Kevin Wolf1-2/+16
Some places in gdb_handle_packet() can get an arbitrary length (most times directly from the client) and either didn't check it at all or checked against the wrong value, potentially causing buffer overflows. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-11-06hw/acpi/aml-build: remove useless glib version checkMarc-André Lureau1-2/+0
2.22 is the minimum version required Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2015-11-06Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream-replay' into ↵Peter Maydell30-58/+1803
staging So here it is, let's see what happens. # gpg: Signature made Fri 06 Nov 2015 09:30:34 GMT using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" * remotes/bonzini/tags/for-upstream-replay: replay: recording of the user input replay: command line options replay: replay blockers for devices replay: initialization and deinitialization replay: ptimer bottom halves: introduce bh call function replay: checkpoints icount: improve counting for record/replay replay: shutdown event replay: recording and replaying clock ticks replay: asynchronous events infrastructure replay: interrupts and exceptions cpu: replay instructions sequence cpu-exec: allow temporary disabling icount replay: introduce icount event replay: introduce mutex to protect the replay log replay: internal functions for replay log replay: global variables and function stubs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-06configure: add missing --disable-modules optionStefan Hajnoczi1-0/+3
According to ./configure all options should have both --enable-foo and --disable-foo: # Always add --enable-foo and --disable-foo command line args. # Distributions want to ensure that several features are compiled in, and it # is impossible without a --enable-foo that exits if a feature is not found. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 1446473183-24250-1-git-send-email-stefanha@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-06Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into ↵Peter Maydell3-6/+33
staging X86 queue, 2015-11-05 # gpg: Signature made Thu 05 Nov 2015 19:35:31 GMT using RSA key ID 984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" * remotes/ehabkost/tags/x86-pull-request: target-i386: Enable clflushopt/clwb/pcommit instructions target-i386: Remove POPCNT from qemu64 and qemu32 CPU models target-i386: Remove ABM from qemu64 CPU model target-i386: Remove SSE4a from qemu64 CPU model target-i386: Set "check=off" by default on pc-*-2.4 and older Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-06replay: recording of the user inputPavel Dovgalyuk7-8/+232
This records user input (keyboard and mouse events) in record mode and replays these input events in replay mode. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162524.8676.11696.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06replay: command line optionsPavel Dovgalyuk3-5/+22
This patch introduces command line options for enabling recording or replaying virtual machine behavior. These options are added to icount command line parameter. They include 'rr' which switches between record and replay and 'rrfile' for specifying the filename for replay log. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162518.8676.70792.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06replay: replay blockers for devicesPavel Dovgalyuk5-0/+35
Some devices are not supported by record/replay subsystem. This patch introduces replay blocker which denies starting record/replay if such devices are included into the configuration. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162512.8676.11367.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06replay: initialization and deinitializationPavel Dovgalyuk6-0/+156
This patch introduces the functions for enabling the record/replay and for freeing the resources when simulator closes. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162507.8676.90232.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06replay: ptimerPavel Dovgalyuk4-4/+28
This patch adds deterministic replay for hardware periodic countdown timers. ptimer uses bottom halves layer to execute such an asynchronous callback. We put this callback into the replay queue instead of bottom halves one. When checkpoint is met by main loop thread, the replay queue is processed and callback is executed. Binding callback moment to one of the checkpoints makes it deterministic. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162456.8676.83366.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06bottom halves: introduce bh call functionPavel Dovgalyuk2-1/+11
This patch introduces aio_bh_call function. It is used to execute bottom halves as callbacks without adding them to the queue. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162450.8676.56980.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06replay: checkpointsPavel Dovgalyuk7-12/+134
This patch introduces checkpoints that synchronize cpu thread and iothread. When checkpoint is met in the code all asynchronous events from the queue are executed. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162444.8676.52916.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06icount: improve counting for record/replayPavel Dovgalyuk2-3/+11
icount_warp_rt function is called by qemu_clock_warp and as callback of icount_warp timer. This patch adds call to qemu_clock_warp into main_loop_wait function, because icount warp may be missed in record/replay mode, when CPU is sleeping. This patch also disables of calling this function by timer, because it is not needed after making modifications of main_loop_wait. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162439.8676.38290.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06replay: shutdown eventPavel Dovgalyuk4-0/+23
This patch records and replays simulator shutdown event. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162433.8676.32262.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06replay: recording and replaying clock ticksPavel Dovgalyuk7-4/+119
Clock ticks are considered as the sources of non-deterministic data for virtual machine. This patch implements saving the clock values when they are acquired (virtual, host clock). When replaying the execution corresponding values are read from log and transfered to the module, which wants to read the values. Such a design required the clock polling to be synchronized. Sometimes it is not true - e.g. when timeouts for timer lists are checked. In this case we use a cached value of the clock, passing it to the client code. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162427.8676.36558.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06replay: asynchronous events infrastructurePavel Dovgalyuk4-0/+263
This patch adds module for saving and replaying asynchronous events. These events include network packets, keyboard and mouse input, USB packets, thread pool and bottom halves callbacks. All events are stored in the queue to be processed at synchronization points such as beginning of TB execution, or checkpoint in the iothread. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162422.8676.88696.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
2015-11-06replay: interrupts and exceptionsPavel Dovgalyuk5-10/+146
This patch includes modifications of common cpu files. All interrupts and exceptions occured during recording are written into the replay log. These events allow correct replaying the execution by kicking cpu thread when one of these events is found in the log. Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162416.8676.57647.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05target-i386: Enable clflushopt/clwb/pcommit instructionsXiao Guangrong2-2/+5
These instructions are used by NVDIMM drivers and the specification is located at: https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf There instructions are available on Skylake Server. Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-11-05target-i386: Remove POPCNT from qemu64 and qemu32 CPU modelsEduardo Habkost2-2/+12
POPCNT is not available on Penryn and older and on Opteron_G2 and older, and we want to make the default CPU runnable in most hosts, so it won't be enabled by default in KVM mode. We should eventually have all features supported by TCG enabled by default in TCG mode, but as we don't have a good mechanism today to ensure we have different defaults in KVM and TCG mode, disable POPCNT in the qemu64 and qemu32 CPU models entirely. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-11-05target-i386: Remove ABM from qemu64 CPU modelEduardo Habkost2-2/+6
ABM is not available on Sandy Bridge and older, and we want to make the default CPU runnable in most hosts, so it won't be enabled by default in KVM mode. We should eventually have all features supported by TCG enabled by default in TCG mode, but as we don't have a good mechanism today to ensure we have different defaults in KVM and TCG mode, disable ABM in the qemu64 CPU model entirely. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-11-05target-i386: Remove SSE4a from qemu64 CPU modelEduardo Habkost2-1/+6
SSE4a is not available in any Intel CPU, and we want to make the default CPU runnable in most hosts, so it doesn't make sense to enable it by default in KVM mode. We should eventually have all features supported by TCG enabled by default in TCG mode, but as we don't have a good mechanism today to ensure we have different defaults in KVM and TCG mode, disable SSE4a in the qemu64 CPU model entirely. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-11-05target-i386: Set "check=off" by default on pc-*-2.4 and olderEduardo Habkost1-0/+5
The default CPU model (qemu64) have some issues today: it enables some features (ABM and SSE4a) that are not present in many host CPUs. That means many hosts (but not all of them) had those features silently disabled in the default configuration in QEMU 2.4 and older. With the new "check=on" default, this causes warnings to be printed in the default configuration, because of the lack of SSE4A on all Intel hosts, and the lack of ABM on Sandy Bridge and older hosts: $ qemu-system-x86_64 -machine pc,accel=kvm warning: host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5] warning: host doesn't support requested feature: CPUID.80000001H:ECX.sse4a [bit 6] Those issues will be fixed in pc-*-2.5 and newer. But as we can't change the guest ABI in pc-*-2.4, disable "check" mode by default in pc-*-2.4 and older so we don't print spurious warnings. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-11-05Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell30-124/+236
* Guest ABI fixes for PC machines (hw_version) * Fixes for recent Perl * John Snow's configure fixes * file-backed RAM improvements (Igor, Pavel) * -Werror=clobbered fixes (Stefan) * Kill -d ioport * Fix qemu-system-s390x * Performance improvement for kvmclock migration # gpg: Signature made Thu 05 Nov 2015 13:42:27 GMT using RSA key ID 78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" * remotes/bonzini/tags/for-upstream: iscsi: Translate scsi sense into error code Revert "Introduce cpu_clean_all_dirty" kvmclock: add a new function to update env->tsc. configure: disable FORTIFY_SOURCE under clang backends/hostmem-file: Allow to specify full pathname for backing file configure: disallow ccache during compile tests cpu-exec: Fix compiler warning (-Werror=clobbered) memory: call begin, log_start and commit when registering a new listener megasas: Use qemu_hw_version() instead of QEMU_VERSION osdep: Rename qemu_{get, set}_version() to qemu_{, set_}hw_version() pc: Set hw_version on all machine classes qemu-log: remove -d ioport ioport: do not use CPU_LOG_IOPORT target-i386: fix pcmpxstrx equal-ordered (strstr) mode scripts/text2pod.pl: Escape left brace file_ram_alloc: propagate error to caller instead of terminating QEMU Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-05iscsi: Translate scsi sense into error codeFam Zheng1-20/+73
Previously we return -EIO blindly when anything goes wrong. Add a helper function to parse sense fields and try to make the return code more meaningful. This also fixes the default werror configuration (enospc) when we're using qcow2 on an iscsi lun. The old -EIO not being treated as out of space error failed to trigger vm stop. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <1446699609-11376-1-git-send-email-famz@redhat.com> [libiscsi 1.9 compatibility - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05cpu: replay instructions sequencePavel Dovgalyuk3-13/+63
This patch adds calls to replay functions into the icount setup block. In record mode number of executed instructions is written to the log. In replay mode number of istructions to execute is taken from the replay log. When replayed instructions counter is expired qemu_notify_event() function is called to wake up the iothread. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162405.8676.31890.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05cpu-exec: allow temporary disabling icountPavel Dovgalyuk3-4/+6
This patch is required for deterministic replay to generate an exception by trying executing an instruction without changing icount. It adds new flag to TB for disabling icount while translating it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162359.8676.77011.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05replay: introduce icount eventPavel Dovgalyuk4-0/+85
This patch adds icount event to the replay subsystem. This event corresponds to execution of several instructions and used to synchronize input events in the replay phase. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162354.8676.31351.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05replay: introduce mutex to protect the replay logPavel Dovgalyuk2-0/+34
This mutex will protect read/write operations for replay log. Using mutex is necessary because most of the events consist of several fields stored in the log. The mutex will help to avoid races. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162348.8676.8628.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05replay: internal functions for replay logPavel Dovgalyuk3-0/+202
This patch adds functions to perform read and write operations with replay log. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162342.8676.29445.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05replay: global variables and function stubsPavel Dovgalyuk9-0/+239
This patch adds global variables, defines, function declarations, and function stubs for deterministic VM replay used by external modules. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20150917162337.8676.41538.stgit@PASHA-ISP.def.inno> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-11-04-tag' ↵Peter Maydell2-26/+30
into staging qemu-ga patch queue * fix file handle cleanup on w32 * use non-blocking mode for file handles on w32 to avoid hangs on guest-file-read/guest-file-write to pipes # gpg: Signature made Wed 04 Nov 2015 19:36:16 GMT using RSA key ID F108B584 # gpg: Good signature from "Michael Roth <flukshun@gmail.com>" # gpg: aka "Michael Roth <mdroth@utexas.edu>" # gpg: aka "Michael Roth <mdroth@linux.vnet.ibm.com>" * remotes/mdroth/tags/qga-pull-2015-11-04-tag: qga: set file descriptor in qmp_guest_file_open non-blocking on Win32 qga: fixed CloseHandle in qmp_guest_file_open qga: drop hand-made guest_file_toggle_flags helper Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-05Revert "Introduce cpu_clean_all_dirty"Liang Li4-23/+0
This reverts commit de9d61e83d43be9069e6646fa9d57a3f47779d28. Now 'cpu_clean_all_dirty' is useless, we can revert the related code. Conflicts: include/sysemu/kvm.h Signed-off-by: Liang Li <liang.z.li@intel.com> Message-Id: <1446695464-27116-3-git-send-email-liang.z.li@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05kvmclock: add a new function to update env->tsc.Liang Li3-16/+48
The commit 317b0a6d8 fixed an issue which caused by the outdated env->tsc value, but the fix lead to 'cpu_synchronize_all_states()' called twice during live migration. The 'cpu_synchronize_all_states()' takes about 130us for a VM which has 4 vcpus, it's a bit expensive. Synchronize the whole CPU context just for updating env->tsc is too wasting, this patch use a new function to update the env->tsc. Comparing to 'cpu_synchronize_all_states()', it only takes about 20us. Signed-off-by: Liang Li <liang.z.li@intel.com> Message-Id: <1446695464-27116-2-git-send-email-liang.z.li@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05configure: disable FORTIFY_SOURCE under clangJohn Snow1-1/+16
Some versions of clang may have difficulty compiling glibc headers when -D_FORTIFY_SOURCE is used. For example, Clang++ 3.5.0-9.fc22 cannot compile glibc's stdio headers when -D_FORTIFY_SOURCE=2 is used. This manifests currently as build failures with clang and any arm target. According to LLVM dev Richard Smith, clang does not target or support FORTIFY_SOURCE + glibc, and it should not be relied on. "It's still an unsupported combination, and while it might compile, some of the checks are unlikely to work because they require a frontend inliner to be useful" See: http://lists.llvm.org/pipermail/cfe-dev/2015-November/045846.html Conclusion: disable fortify-source if we appear to be using clang instead of testing for compile success or failure, which may be incidental or not indicative of proper support of the feature. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <1446583422-10153-1-git-send-email-jsnow@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-05Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20151104' ↵Peter Maydell8-31/+31
into staging migration/next for 20151104 # gpg: Signature made Wed 04 Nov 2015 12:45:19 GMT using RSA key ID 5872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" # gpg: aka "Juan Quintela <quintela@trasno.org>" * remotes/juanquintela/tags/migration/20151104: migration: fix analyze-migration.py script migration: code clean up migration: rename cancel to cleanup in SaveVMHandles migration: rename qemu_savevm_state_cancel migration: defer migration_end & blk_mig_cleanup Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-04Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2015-11-03' ↵Peter Maydell1-131/+125
into staging vl.c: Error message rework # gpg: Signature made Tue 03 Nov 2015 08:40:50 GMT using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-error-2015-11-03: vl.c: Use "%s support is disabled" error messages consistently vl.c: Improve warnings on use of deprecated options vl.c: Touch up error messages vl.c: Remove unnecessary uppercase in error messages vl.c: Use "warning:" prefix consistently on warnings vl.c: Remove periods and exclamation points from error messages vl.c: Replace fprintf(stderr) with error_report() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-04backends/hostmem-file: Allow to specify full pathname for backing filePavel Fedin2-14/+22
This allows to explicitly specify file name to use with the backend. This is important when using it together with ivshmem in order to make it backed by hugetlbfs. By default filename is autogenerated using mkstemp(), and the file is unlink()ed after creation, effectively making it anonymous. This is not very useful with ivshmem because it ends up in a memory which cannot be accessed by something else. Distinction between directory and file name is done by stat() check. If an existing directory is given, the code keeps old behavior. Otherwise it creates or opens a file with the given pathname. Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Tested-by: Igor Skalkin <i.skalkin@samsung.com> Message-Id: <004301d11166$9672fe30$c358fa90$@samsung.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-04configure: disallow ccache during compile testsJohn Snow1-0/+4
If the user is using ccache during the configuration step, it may interfere with some of the configuration tests, particularly the "Is ccache interfering with macro analysis" step, which is a bit of a poetic problem. 1) Disallow ccache from reading from the cache during configure, but don't disable it entirely to allow us to see if it causes other problems. 2) Force off CCACHE_CPP2 during the ccache test to get a deterministic answer over whether or not we need to enable that feature later. Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <1446055000-29150-1-git-send-email-jsnow@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-04cpu-exec: Fix compiler warning (-Werror=clobbered)Stefan Weil1-3/+15
Reloading of local variables after sigsetjmp is only needed for some buggy compilers. The code which should reload these variables causes compiler warnings with gcc 4.7 when compiler optimizations are enabled: cpu-exec.c:204:15: error: variable ‘cpu’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] cpu-exec.c:207:15: error: variable ‘cc’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] cpu-exec.c:202:28: error: argument ‘env’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] Now this code is only used for compilers which need it (and gcc 4.5.x, x > 0 which does not need it but won't give warnings). There were bug reports for clang and gcc 4.5.0, while gcc 4.5.1 was reported to work fine without the reload code. For clang it is not clear which versions are affected, so simply keep the status quo for all clang compilations. This can be improved later. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-Id: <1443266606-21400-1-git-send-email-sw@weilnetz.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-04memory: call begin, log_start and commit when registering a new listenerPaolo Bonzini2-1/+10
This ensures that cpu_reload_memory_map() is called as soon as tcg_cpu_address_space_init() is called, and before cpu->memory_dispatch is used. qemu-system-s390x never changes the address spaces after tcg_cpu_address_space_init() is called, and thus tcg_commit() is never called. This causes a SIGSEGV. Because memory_map_init() will now call mem_commit(), we have to initialize io_mem_* before address_space_memory and friends. Reported-by: Philipp Kern <pkern@debian.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Fixes: 0a1c71cec63e95f9b8d0dc96d049d2daa00c5210 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-04megasas: Use qemu_hw_version() instead of QEMU_VERSIONEduardo Habkost1-1/+1
Guest visible data shouldn't change with a simple QEMU upgrade, so use qemu_hw_version() to ensure it won't change (as long as the machine class being used has hw_version set). Cc: Hannes Reinecke <hare@suse.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: qemu-block@nongnu.org Reviewed-by: Hannes Reinecke <hare@suse.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1446233769-7892-4-git-send-email-ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-04osdep: Rename qemu_{get, set}_version() to qemu_{, set_}hw_version()Eduardo Habkost8-13/+13
This makes the purpose of the function clearer: it is not about the version of QEMU that's running, but the version string exposed in the emulated hardware. Cc: Andrzej Zaborowski <balrogg@gmail.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: John Snow <jsnow@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1446233769-7892-3-git-send-email-ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-04pc: Set hw_version on all machine classesEduardo Habkost2-0/+23
In 2012, QEMU had a bug where it exposed QEMU version information to the guest, meaning a QEMU upgrade would expose different hardware to the guest OS even if the same machine-type is being used. The bug was fixed by commit 93bfef4c6e4b23caea9d51e1099d06433d8835a4, on all machines up to pc-1.0. But we kept introducing the same bug on all newer machines since then. That means we are breaking guest ABI every time QEMU was upgraded. Fix this by setting the hw_version on all PC machines, making sure the hardware won't change when upgrading QEMU. Note that QEMU_VERSION was "1.0" in QEMU 1.0, but starting on QEMU 1.1.0, it started following the "x.y.0" pattern. We have to follow it, to make sure we use the right QEMU_VERSION string from each QEMU release. The 2.5 machine classes could have hw_version unset, because the default value for qemu_get_version() is QEMU_VERSION. But I decided to set it explicitly to QEMU_VERSION so we don't forget to update it to "2.5.0" after we release 2.5.0 and create a 2.6 machine class. Reported-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <1446233769-7892-2-git-send-email-ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-04qemu-log: remove -d ioportPaolo Bonzini2-3/+0
It was disabled at compile-time, and is now replaced by tracepoints. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-04ioport: do not use CPU_LOG_IOPORTPaolo Bonzini2-22/+8
These messages are disabled by default; a perfect usecase for tracepoints, which in fact already exist. Add the missing information to them and stop using qemu_log_mask. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-04target-i386: fix pcmpxstrx equal-ordered (strstr) modePaolo Bonzini1-2/+2
In this mode, referring an invalid element of the source forces the result to false (table 4-7, last column) but referring an invalid element of the destination forces the result to true, so the outer loop should still be run even if some elements of the destination will be invalid. They will be avoided in the inner loop, which correctly bounds "i" to validd, but they will still contribute to a positive outcome of the search. This fixes tst_strstr in glibc 2.17. Reported-by: Florian Weimer <fweimer@redhat.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-11-04qga: set file descriptor in qmp_guest_file_open non-blocking on Win32Olga Krishtal1-0/+27
Set fd non-blocking to avoid common use cases (like reading from a named pipe) from hanging the agent. This was missed in the original code. The patch introduces qemu_set_handle_nonoblocking, the local analog of qemu_set_nonblock for HANDLES. The usage of handles in qemu_set_non/block is impossible, because for win32 there is a difference between file discriptors and file handles, and all file ops are made via Win32 api. Signed-off-by: Olga Krishtal <okrishtal@parallels.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Michael Roth <mdroth@linux.vnet.ibm.com> CC: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2015-11-04qga: fixed CloseHandle in qmp_guest_file_openOlga Krishtal1-1/+1
CloseHandle use HANDLE as an argument, but not *HANDLE Signed-off-by: Olga Krishtal <okrishtal@parallels.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> CC: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>