- 23 6月, 2015 1 次提交
-
-
由 Markus Armbruster 提交于
These macros expand into error class enumeration constant, comma, string. Unclean. Has been that way since commit 13f59ae8. The error class is always ERROR_CLASS_GENERIC_ERROR since the previous commit. Clean up as follows: * Prepend every use of a QERR_ macro by ERROR_CLASS_GENERIC_ERROR, and delete it from the QERR_ macro. No change after preprocessing. * Rewrite error_set(ERROR_CLASS_GENERIC_ERROR, ...) into error_setg(...). Again, no change after preprocessing. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 12 6月, 2015 1 次提交
-
-
由 Juan Quintela 提交于
We create optional sections with this patch. But we already have optional subsections. Instead of having two mechanism that do the same, we can just generalize it. For subsections we just change: - Add a needed function to VMStateDescription - Remove VMStateSubsection (after removal of the needed function it is just a VMStateDescription) - Adjust the whole tree, moving the needed function to the corresponding VMStateDescription Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 05 6月, 2015 3 次提交
-
-
由 Victor CLEMENT 提交于
While qemu is running in sleep=no mode, a warning will be printed when no timer deadline is set. As this mode is intended for getting deterministic virtual time, if no timer is set on the virtual clock this determinism is broken. Signed-off-by: NVictor CLEMENT <victor.clement@openwide.fr> Message-Id: <1432912446-9811-4-git-send-email-victor.clement@openwide.fr> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Victor CLEMENT 提交于
The 'sleep' parameter sets the icount_sleep mode, which is enabled by default. To disable it, add the 'sleep=no' parameter (or 'nosleep') to the qemu -icount option. Signed-off-by: NVictor CLEMENT <victor.clement@openwide.fr> Message-Id: <1432912446-9811-3-git-send-email-victor.clement@openwide.fr> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Victor CLEMENT 提交于
When the icount_sleep mode is disabled, the QEMU_VIRTUAL_CLOCK runs at the maximum possible speed by warping the sleep times of the virtual cpu to the soonest clock deadline. The virtual clock will be updated only according the instruction counter. Signed-off-by: NVictor CLEMENT <victor.clement@openwide.fr> Message-Id: <1432912446-9811-2-git-send-email-victor.clement@openwide.fr> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 14 5月, 2015 1 次提交
-
-
由 Eduardo Habkost 提交于
This will allow clients to query additional information directly using qom-get on the CPU objects. Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au> Reviewed-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
- 30 4月, 2015 1 次提交
-
-
由 Emilio G. Cota 提交于
Signed-off-by: NEmilio G. Cota <cota@braap.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 25 3月, 2015 1 次提交
-
-
由 Peter Crosthwaite 提交于
following a4649824, it's now possible for there to be attempts to take the BQL before CPUs have been realized in cases where a machine model inits peripherals before the first CPU. BQL lock aquisition kicks the first_cpu, leading to a segfault if this happens pre-realize. Guard the CPU kick routine to perform no action for a CPU that doesn't exist or doesn't have a thread yet. There was a fix to this with commit 6b49809c, but the check there misses the case where the CPU has been inited and not realized. Strengthen the check to make sure that the first_cpu has a thread (i.e. it is realized) before allowing the kick. Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Message-Id: <1427107689-6946-1-git-send-email-peter.crosthwaite@xilinx.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 18 3月, 2015 1 次提交
-
-
由 Alexey Kardashevskiy 提交于
2ed1ebcf "timer: replace time() with QEMU_CLOCK_HOST" broke compile when configured with --enable-profiler. Turned out the profiler has been broken for a while. This does s/qemu_time/tcg_time/ as the profiler only works in a TCG mode. This also fixes the compile error. This changes profile_getclock() to return nanoseconds rather than CPU ticks as the "profile" HMP command prints seconds and there is no platform-independent way to get ticks-per-second rate. Since TCG is quite slow and get_clock() returns nanoseconds (fine enough), this should not affect precision much. This removes unused qemu_time_start and tlb_flush_time. Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru> Message-Id: <1426478258-29961-1-git-send-email-aik@ozlabs.ru> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 10 3月, 2015 1 次提交
-
-
由 Borislav Petkov 提交于
When requesting a size which cannot be read, the error message shows a different address which is misleading to the user and it looks like something's wrong with the address parsing. This is because the input @addr variable is incremented in the memory dumping loop: (qemu) memsave 0xffffffff8418069c 0xb00000 mem Invalid addr 0xffffffff849ffe9c specified Fix that by saving the original address and size and use them in the error message: (qemu) memsave 0xffffffff8418069c 0xb00000 mem Invalid addr 0xffffffff8418069c/size 11534336 specified Signed-off-by: NBorislav Petkov <bp@suse.de> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 02 3月, 2015 2 次提交
-
-
由 Paolo Bonzini 提交于
For good measure, ensure that the following sequence: thread 1 calls qemu_mutex_lock_iothread thread 2 calls qemu_mutex_lock_iothread VCPU thread are created VCPU thread enters execution loop results in the VCPU threads letting the other two threads run and obeying iothread_requesting_mutex even if the VCPUs are not halted. To do this, check iothread_requesting_mutex before execution starts. Tested-by: NLeon Alrae <leon.alrae@imgtec.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
When two threads (other than the low-priority TCG VCPU thread) are competing for the iothread lock, a deadlock can happen. This is because iothread_requesting_mutex is set to false by the first thread that gets the mutex, and then the VCPU thread might never yield from the execution loop. If iothread_requesting_mutex is changed from a bool to a counter, the deadlock is fixed. However, there is another bug in qemu_mutex_lock_iothread that can be triggered by the new call_rcu thread. The bug happens if qemu_mutex_lock_iothread is called before the CPUs are created. In that case, first_cpu is NULL and the caller segfaults in qemu_mutex_lock_iothread. To fix this, just do not do the kick if first_cpu is NULL. Reported-by: NLeon Alrae <leon.alrae@imgtec.com> Reported-by: NAndreas Gustafsson <gson@gson.org> Tested-by: NLeon Alrae <leon.alrae@imgtec.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 17 2月, 2015 1 次提交
-
-
由 Paolo Bonzini 提交于
Note that even after this patch, most callers of address_space_* functions must still be under the big QEMU lock, otherwise the memory region returned by address_space_translate can disappear as soon as address_space_translate returns. This will be fixed in the next part of this series. Reviewed-by: NFam Zheng <famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 16 2月, 2015 1 次提交
-
-
由 Fam Zheng 提交于
qemu_clock_run_timers() only takes care of main_loop_tlg, we shouldn't forget aio timer list groups. Currently, the qemu_clock_deadline_ns_all (a few lines above) counts all the timergroups of this clock type, including aio tlg, but we don't fire them, so they are never cleared, which makes a dead loop. For example, this function hangs when trying to drive throttled block request queue with qtest clock_step. Signed-off-by: NFam Zheng <famz@redhat.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Message-id: 1421661103-29153-1-git-send-email-famz@redhat.com Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 02 2月, 2015 1 次提交
-
-
由 Paolo Bonzini 提交于
With the introduction of QEMU_CLOCK_VIRTUAL_RT, the computation of sc->diff_clk can be simplified nicely: qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - qemu_clock_get_ns(QEMU_CLOCK_REALTIME) + cpu_get_clock_offset() = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - (qemu_clock_get_ns(QEMU_CLOCK_REALTIME) - cpu_get_clock_offset()) = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - (qemu_clock_get_ns(QEMU_CLOCK_REALTIME) + timers_state.cpu_clock_offset) = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL_RT) Cc: Sebastian Tanase <sebastian.tanase@openwide.fr> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 14 1月, 2015 1 次提交
-
-
由 Pavel Dovgalyuk 提交于
Fix mismatch between timer_new_ms and timer_mod. Signed-off-by: NPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 21 12月, 2014 1 次提交
-
-
由 Paolo Bonzini 提交于
This unbreaks linux-user (broken by e511b4d7, cpu-exec: reset exception_index correctly, 2014-11-26). Reported-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Tested-by: NLaurent Desnogues <laurent.desnogues@gmail.com> Tested-by: NEduardo Habkost <ehabkost@redhat.com> Message-id: 1418989994-17244-2-git-send-email-pbonzini@redhat.com Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 15 12月, 2014 4 次提交
-
-
由 Pavel Dovgalyuk 提交于
This patch makes icount warp use the new QEMU_CLOCK_VIRTUAL_RT clock. This way, icount's QEMU_CLOCK_VIRTUAL will never count time during which the virtual machine is stopped. Signed-off-by: NPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Pavel Dovgalyuk 提交于
Separate accessing the instruction counter from the compensation for speed and halting that are introduced by qemu_icount_bias. This introduces new infrastructure used by the record/replay patches. Signed-off-by: NPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Pavel Dovgalyuk 提交于
This patch sets can_do_io function to allow reading icount within cpu-exec, but outside TB execution. Signed-off-by: NPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Pavel Dovgalyuk 提交于
Exception index is reset at every entry at every entry into cpu_exec() function. This may cause missing the exceptions while replaying them. This patch moves exception_index reset to the locations where they are processed. Signed-off-by: NPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 16 9月, 2014 1 次提交
-
-
由 Marcelo Tosatti 提交于
Introduce cpu_clean_all_dirty, to force subsequent cpu_synchronize_all_states to read in-kernel register state. Cc: qemu-stable@nongnu.org Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 11 9月, 2014 1 次提交
-
-
由 Pavel Dovgalyuk 提交于
Ticks and clock offset used by CPU timers have to be saved in vmstate. But vmstate for these fields registered only in icount mode. Missing registration leads to breaking the continuity when vmstate is loaded. This patch introduces new initialization function which fixes this. Signed-off-by: NPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 01 9月, 2014 1 次提交
-
-
由 Bastian Koppelmann 提交于
Add TriCore target stubs, and QOM cpu, and Maintainer Signed-off-by: NBastian Koppelmann <kbastian@mail.uni-paderborn.de> Message-id: 1409572800-4116-2-git-send-email-kbastian@mail.uni-paderborn.de Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 25 8月, 2014 2 次提交
-
-
由 Alexey Kardashevskiy 提交于
This implements an NMI interface for s390 and s390-ccw machines. This removes #ifdef s390 branch in qmp_inject_nmi so new s390's nmi_monitor_handler() callback is going to be used for NMI. Since nmi_monitor_handler()-calling code is platform independent, CPUState::cpu_index is used instead of S390CPU::env.cpu_num. There should not be any change in behaviour as both @cpu_index and @cpu_num are global CPU numbers. Note that s390_cpu_restart() already takes care of the specified cpu, so we don't need to schedule via async_run_on_cpu(). Since the only error s390_cpu_restart() can return is ENOSYS, convert it to QERR_UNSUPPORTED. Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: NAlexander Graf <agraf@suse.de> Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Alexey Kardashevskiy 提交于
This introduces an NMI (Non Maskable Interrupt) interface with a single nmi_monitor_handler() method. A machine or a device can implement it. This searches for an QOM object with this interface and if it is implemented, calls it. The callback implements an action required to cause debug crash dump on in-kernel debugger invocation. The callback returns Error**. This adds a nmi_monitor_handle() helper which walks through all objects to find the interface. The interface method is called for all found instances. This adds support for it in qmp_inject_nmi(). Since no architecture supports it at the moment, there is no change in behaviour. This changes inject-nmi command description for HMP and QMP. Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 07 8月, 2014 1 次提交
-
-
由 Sebastian Tanase 提交于
Show in 'info jit' the current delay between the host clock and the guest clock. In addition, print the maximum advance and delay of the guest compared to the host. Signed-off-by: NSebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: NCamille Bégué <camille.begue@openwide.fr> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 06 8月, 2014 7 次提交
-
-
由 Sebastian Tanase 提交于
The goal is to sleep qemu whenever the guest clock is in advance compared to the host clock (we use the monotonic clocks). The amount of time to sleep is calculated in the execution loop in cpu_exec. At first, we tried to approximate at each for loop the real time elapsed while searching for a TB (generating or retrieving from cache) and executing it. We would then approximate the virtual time corresponding to the number of virtual instructions executed. The difference between these 2 values would allow us to know if the guest is in advance or delayed. However, the function used for measuring the real time (qemu_clock_get_ns(QEMU_CLOCK_REALTIME)) proved to be very expensive. We had an added overhead of 13% of the total run time. Therefore, we modified the algorithm and only take into account the difference between the 2 clocks at the begining of the cpu_exec function. During the for loop we try to reduce the advance of the guest only by computing the virtual time elapsed and sleeping if necessary. The overhead is thus reduced to 3%. Even though this method still has a noticeable overhead, it no longer is a bottleneck in trying to achieve a better guest frequency for which the guest clock is faster than the host one. As for the the alignement of the 2 clocks, with the first algorithm the guest clock was oscillating between -1 and 1ms compared to the host clock. Using the second algorithm we notice that the guest is 5ms behind the host, which is still acceptable for our use case. The tests where conducted using fio and stress. The host machine in an i5 CPU at 3.10GHz running Debian Jessie (kernel 3.12). The guest machine is an arm versatile-pb built with buildroot. Currently, on our test machine, the lowest icount we can achieve that is suitable for aligning the 2 clocks is 6. However, we observe that the IO tests (using fio) are slower than the cpu tests (using stress). Signed-off-by: NSebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: NCamille Bégué <camille.begue@openwide.fr> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Sebastian Tanase 提交于
The align option is used for activating the align algorithm in order to synchronise the host clock and the guest clock. Signed-off-by: NSebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: NCamille Bégué <camille.begue@openwide.fr> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Sebastian Tanase 提交于
Make icount parameter use QemuOpts style options in order to easily add other suboptions. Signed-off-by: NSebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: NCamille Bégué <camille.begue@openwide.fr> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Sebastian Tanase 提交于
When using the icount option on ARM, the virtual clock starts counting at realtime clock but it should start at 0. The reason why the virtual clock starts at realtime clock is because the first time we call qemu_clock_warp (which calls icount_warp_rt) in tcg_exec_all, qemu_icount_bias (which is part of the virtual time computation mechanism) will increment by realtime - vm_clock_warp_start, with vm_clock_warp_start being 0 (see icount_warp_rt in cpus.c). By changing the value of vm_clock_warp_start from 0 to -1, the first time we call qemu_clock_warp which calls icount_warp_rt, we will return immediatly because icount_warp_rt first checks if vm_clock_warp_start is -1 and if it's the case it returns. Therefore, qemu_icount_bias will first be incremented by the value of a virtual timer deadline when the virtual cpu goes from active to inactive. The virtual time will start at 0 and increment based on the instruction counter when the vcpu is active or the qemu_icount_bias value when inactive. Signed-off-by: NSebastian Tanase <sebastian.tanase@openwide.fr> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 KONRAD Frederic 提交于
This adds cpu_icount_to_ns function which is needed for reverse execution. It returns the time for a specific instruction. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 KONRAD Frederic 提交于
This fixes a bug where qemu_icount and qemu_icount_bias are not migrated. It adds a subsection "timer/icount" to vmstate_timers so icount is migrated only when needed. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: NAmit Shah <amit.shah@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 KONRAD Frederic 提交于
This puts qemu_icount and qemu_icount_bias into TimerState structure to allow them to be migrated. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 23 6月, 2014 2 次提交
-
-
由 Wenchao Xia 提交于
Signed-off-by: NWenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Paolo Bonzini 提交于
There patch protects vmstop_requested with a lock and introduces qemu_system_vmstop_request_prepare. Together with the new call to qemu_vmstop_requested in vm_start, qemu_system_vmstop_request_prepare avoids a race where the VM could remain stopped even though the iostatus of a block device has already been set (for example). qemu_system_vmstop_request_prepare however also lets the caller thread delay observation of the state change until it has itself communicated that change to the user. This delay avoids any possibility of a wrong reordering of the BLOCK_IO_ERROR event and the subsequent STOP event. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 19 6月, 2014 1 次提交
-
-
由 Wanlong Gao 提交于
Signed-off-by: NWanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NHu Tao <hutao@cn.fujitsu.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com> Signed-off-by: NAndre Przywara <andre.przywara@amd.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> MST: comment tweaks
-
- 17 6月, 2014 1 次提交
-
-
由 Sergey Fedorov 提交于
Use dedicated qemu_soonest_timeout() instead of MIN(). Signed-off-by: NSergey Fedorov <serge.fdrv@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 14 5月, 2014 1 次提交
-
-
由 Juan Quintela 提交于
After previous Peter patch, they are redundant. This way we don't assign them except when needed. Once there, there were lots of case where the ".fields" indentation was wrong: .fields = (VMStateField []) { and .fields = (VMStateField []) { Change all the combinations to: .fields = (VMStateField[]){ The biggest problem (appart from aesthetics) was that checkpatch complained when we copy&pasted the code from one place to another. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 27 4月, 2014 1 次提交
-
-
由 Stefan Weil 提交于
These functions don't need type casts (as does cpu_physical_memory_rw) and also make the code better readable. Signed-off-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-