- Jun 12, 2019
-
-
Markus Armbruster authored
No header includes qemu-common.h after this commit, as prescribed by qemu-common.h's file comment. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20190523143508.25387-5-armbru@redhat.com> [Rebased with conflicts resolved automatically, except for include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and net/tap-bsd.c fixed up]
-
- Nov 08, 2018
-
-
Peter Maydell authored
Currently replay_get_byte() does not check for an error from getc(). Coverity points out (CID 1390622) that this could result in unexpected behaviour (such as looping forever, if we use the replay_get_dword() return value for a loop count). We don't expect reads from the replay log to fail, and if they do there is no way we can continue. So make them fatal errors. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-id: 20181106153330.5139-1-peter.maydell@linaro.org
-
- Oct 19, 2018
-
-
Paolo Bonzini authored
This avoids lock recursion when REPLAY_CLOCK is called inside the timers spinlock. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Pavel Dovgaluk authored
As QEMU becomes more multi-threaded and non-synchronized, checkpoints move from thread to thread. And the event queue that processed at checkpoints should belong to the same thread in both record and replay executions. This patch disables asynchronous event processing at virtual clock checkpoint, because it may be invoked in different threads at record and replay. This patch is temporary fix until the checkpoints are completely refactored. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Message-Id: <20181018063345.7433.11678.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 02, 2018
-
-
Pavel Dovgaluk authored
This patch enables using -loadvm in recording mode to allow starting the execution recording from any of the available snapshots. It also fixes loading of the record/replay state, therefore snapshots created in replay mode may also be used for starting the new recording. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Message-Id: <20180912081939.3228.56131.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Pavel Dovgaluk authored
This patch adds events processing when emulation finishes instead of just cleaning the queue. Now the bdrv coroutines will be in consistent state when emulator closes. It allows correct polling of the block layer at exit. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Message-Id: <20180912081859.3228.79735.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Pavel Dovgaluk authored
In record/replay icount mode vCPU thread and iothread synchronize the execution using the checkpoints. vCPU thread processes the virtual timers and iothread processes all others. When iothread wants to wake up sleeping vCPU thread, it sends dummy queued work. Therefore it could be the following sequence of the events in record mode: - IO: sending dummy work - IO: processing timers - CPU: wakeup - CPU: clearing dummy work - CPU: processing virtual timers But due to the races in replay mode the sequence may change: - IO: sending dummy work - CPU: wakeup - CPU: clearing dummy work - CPU: sleeping again because nothing to do - IO: Processing timers - CPU: zzzz In this case vCPU will not wake up, because dummy work is not to be set up again. This patch tries to wake up the vCPU when it sleeps and the icount warp checkpoint isn't met. It means that vCPU has something to do, because there are no other reasons of non-matching warp checkpoint. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> -- v5: improve checking that vCPU is still sleeping Message-Id: <20180912081945.3228.19776.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 25, 2018
-
-
Thomas Huth authored
These files can not be executed on the host, so they should not be marked as executable. Reviewed-by:
David Hildenbrand <david@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Mar 12, 2018
-
-
Pavel Dovgaluk authored
This patch fixes saving and loading the snapshots in the replay mode. It is required for the snapshots created in the moment when the header of the asynchronous event is read. This information was not saved in the snapshot. After loading the vmstate replay continued with the file offset passed the event header. The event header is lost in this case and replay hangs. Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Message-Id: <20180227095322.1060.53929.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Pavel Dovgaluk authored
Virtual clock is warped from iothread and vcpu thread. When the hardware events associated with warp checkpoint, then interrupt delivering may be non-deterministic if checkpoint is processed in different threads in record and replay. This patch disables event processing for clock warp checkpoint and leaves all hardware events to other checkpoints (e.g., virtual clock). Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20180227095316.1060.4134.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
-
Pavel Dovgaluk authored
This patch adds a flag which denies recursive call of replay_checkpoint function. Checkpoints may be accompanied by the hardware events. When event is processed, virtual device may invoke timer modification functions that also invoke the checkpoint function. This leads to infinite loop. Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20180227095305.1060.56463.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
-
Pavel Dovgaluk authored
This patch adds error reporting when fwrite cannot completely save the buffer to the file. Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20180227095259.1060.86410.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
-
Alex Bennée authored
Now instead of using the replay_lock to guard the output of the log we now use it to protect the whole execution section. This replaces what the BQL used to do when it was held during TCG execution. We also introduce some rules for locking order - mainly that you cannot take the replay_mutex while holding the BQL. This leads to some slight sophistry during start-up and extending the replay_mutex_destroy function to unlock the mutex without checking for the BQL condition so it can be cleanly dropped in the non-replay case. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Tested-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20180227095248.1060.40374.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
Pavel Dovgaluk authored
Replay mutex is held by vCPU thread and destroy function is called from atexit of the main thread. Therefore we cannot destroy it safely. Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180227095254.1060.96971.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
-
Alex Bennée authored
The replay_mutex_lock/unlock/locked functions are now going to be used for ensuring lock-step behaviour between the two threads. Make them public API functions and also provide stubs for non-QEMU builds on common paths. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20180227095242.1060.16601.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
This is modelled after the iothread mutex lock. We keep a TLS flag to indicate when that thread has acquired the lock and assert we don't double-lock or release when we shouldn't have. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20180227095237.1060.44661.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
This time commit 802f045a broke the replay file format. Also add a comment about this to replay-internal.h. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180227095231.1060.91180.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Pavel Dovgaluk authored
This patch adds saving/restoring of the host clock field 'last'. It is used in host clock calculation and therefore clock may become incorrect when using restored vmstate. Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180227095226.1060.50975.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
-
Pavel Dovgaluk authored
This patch does not allows saving/loading vmstate when replay events queue is not empty. There is no reliable way to save events queue, because it describes internal coroutine state. Therefore saving and loading operations should be deferred to another record/replay step. Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20180227095214.1060.32939.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
-
Pavel Dovgaluk authored
This patch fixes assignment to internal events_enabled variable. Now it is set only in record/replay mode. This affects the behavior of the external functions that check this flag. Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180227095209.1060.45884.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
-
Pavel Dovgaluk authored
Asynchronous events saved at checkpoints may invoke callbacks when processed. These callbacks may also generate/read new events (e.g. clock reads). Therefore event processing flag must be reset before callback invocation. Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20180227095203.1060.70831.stgit@pasha-VirtualBox> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
-
- Mar 02, 2018
-
-
Markus Armbruster authored
In my "build everything" tree, a change to the types in qapi-schema.json triggers a recompile of about 4800 out of 5100 objects. The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h, qapi-types.h. Each of these headers still includes all its shards. Reduce compile time by including just the shards we actually need. To illustrate the benefits: adding a type to qapi/migration.json now recompiles some 2300 instead of 4800 objects. The next commit will improve it further. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20180211093607.27351-24-armbru@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> [eblake: rebase to master] Signed-off-by:
Eric Blake <eblake@redhat.com>
-
- Feb 09, 2018
-
-
Markus Armbruster authored
qemu-common.h includes qemu/option.h, but most places that include the former don't actually need the latter. Drop the include, and add it to the places that actually need it. While there, drop superfluous includes of both headers, and separate #include from file comment with a blank line. This cleanup makes the number of objects depending on qemu/option.h drop from 4545 (out of 4743) to 284 in my "build everything" tree. Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-20-armbru@redhat.com> [Semantic conflict with commit bdd6a90a in block/nvme.c resolved]
-
Markus Armbruster authored
This cleanup makes the number of objects depending on qapi/error.h drop from 1910 (out of 4743) to 1612 in my "build everything" tree. While there, separate #include from file comment with a blank line, and drop a useless comment on why qemu/osdep.h is included first. Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-5-armbru@redhat.com> [Semantic conflict with commit 34e304e9 resolved, OSX breakage fixed]
-
- Sep 27, 2017
-
-
Dr. David Alan Gilbert authored
Modify the pre_save method on VMStateDescription to return an int rather than void so that it potentially can fail. Changed zillions of devices to make them return 0; the only case I've made it return non-0 is hw/intc/s390_flic_kvm.c that already had an error_report/return case. Note: If you add an error exit in your pre_save you must emit an error_report to say why. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20170925112917.21340-2-dgilbert@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com>
-
- Jun 02, 2017
-
-
Marc-André Lureau authored
So they are all in one place. The following patch will move serial & parallel declarations to the respective headers. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
- Jun 01, 2017
-
-
Juan Quintela authored
Start removing migration code from sysemu/sysemu.h. Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com>
-
- May 23, 2017
-
-
Eric Blake authored
Time to wire up all the call sites that request a shutdown or reset to use the enum added in the previous patch. It would have been less churn to keep the common case with no arguments as meaning guest-triggered, and only modified the host-triggered code paths, via a wrapper function, but then we'd still have to audit that I didn't miss any host-triggered spots; changing the signature forces us to double-check that I correctly categorized all callers. Since command line options can change whether a guest reset request causes an actual reset vs. a shutdown, it's easy to also add the information to reset requests. Signed-off-by:
Eric Blake <eblake@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> [ppc parts] Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> [SPARC part] Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x parts] Message-Id: <20170515214114.15442-5-eblake@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
Eric Blake authored
With the recent addition of ShutdownCause, we want to be able to pass a cause through any shutdown request, and then faithfully replay that cause when later replaying the same sequence. The easiest way is to expand the reply event mechanism to track a series of values for EVENT_SHUTDOWN, one corresponding to each value of ShutdownCause. We are free to change the replay stream as needed, since there are already no guarantees about being able to use a replay stream by any other version of qemu than the one that generated it. The cause is not actually fed back until the next patch changes the signature for requesting a shutdown; a TODO marks that upcoming change. Yes, this uses the gcc/clang extension of a ranged case label, but this is not the first time we've used non-C99 constructs. Signed-off-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20170515214114.15442-4-eblake@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- May 17, 2017
-
-
Juan Quintela authored
This way we use the "normal" way of printing errors for hmp commands. Signed-off-by:
Juan Quintela <quintela@redhat.com> Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com>
-
- May 04, 2017
-
-
Juan Quintela authored
load_vmstate() already use error_report, so be consistent. There is an identical error message in load_vmstate() that ends in a period. Remove it. Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com>
-
- Apr 10, 2017
-
-
Alex Bennée authored
If we find ourselves trying to add an event to the log where time has gone backwards it is because a vCPU event has occurred and the main-loop is not yet aware of time moving forward. This should not happen and if it does its better to fail early than generate a log that will have weird behaviour. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
- Mar 28, 2017
-
-
Alex Bennée authored
A previous commit (3d4d16f4) added support for audio record/playback. However this breaks the logfile ABI due to the re-ordering of the ReplayEvents enum. The REPLAY_VERSION check is meant to prevent you from using old log files in newer QEMUs but this is currently broken. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Mar 14, 2017
-
-
Paolo Bonzini authored
This dependency is the wrong way, and we will need util/qemu-timer.h from sysemu/cpus.h in the next patch. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Mar 01, 2017
-
-
Pavel Dovgaluk authored
This patch adds recording and replaying audio data. Is saves synchronization information for audio out and inputs from the microphone. v2: removed unneeded whitespace change Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-id: 20170202055054.4848.94901.stgit@PASHA-ISP.lan02.inno [ kraxel: add qemu/error-report.h include to fix osx build failure ] Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- Jan 27, 2017
-
-
Marc-André Lureau authored
Pick a uniform chardev type name. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Pavel Dovgaluk authored
This patch implements initial vmstate creation or loading at the start of record/replay. It is needed for rewinding the execution in the replay mode. v4 changes: - snapshots are not created by default anymore v3 changes: - added rrsnapshot option Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20170124071746.4572.61449.stgit@PASHA-ISP> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jan 06, 2017
-
-
Pavel Dovgaluk authored
This patch adds support of recording and replaying network packets in irount rr mode. Record and replay for network interactions is performed with the network filter. Each backend must have its own instance of the replay filter as follows: -netdev user,id=net1 -device rtl8139,netdev=net1 -object filter-replay,id=replay,netdev=net1 Replay network filter is used to record and replay network packets. While recording the virtual machine this filter puts all packets coming from the outer world into the log. In replay mode packets from the log are injected into the network device. All interactions with network backend in replay mode are disabled. v5 changes: - using iov_to_buf function instead of loop Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Sep 27, 2016
-
-
Pavel Dovgaluk authored
This patch fixes bug with stopping and restarting replay through monitor. Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20160926080815.6992.71818.stgit@PASHA-ISP> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Pavel Dovgaluk authored
This patch introduces vmstate for replay data structures. It allows saving and loading vmstate while replaying. Signed-off-by:
Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20160926080810.6992.68420.stgit@PASHA-ISP> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-