- 17 10月, 2013 6 次提交
-
-
由 Paolo Bonzini 提交于
This lets threads other than the I/O thread use vm_clock even in -icount mode. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Reviewed-by: NAlex Bligh <alex@alex.org.uk> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Computing the deadline of all vm_clocks is somewhat expensive and calls out to qemu-timer.c; two reasons not to do it in the seqlock's write-side critical section. This however opens the door for races in setting and reading vm_clock_warp_start. To plug them, we need to cover the case where a new deadline slips in between the call to qemu_clock_deadline_ns_all and the actual modification of the icount_warp_timer. Restrict changes to vm_clock_warp_start and the icount_warp_timer's expiration time, to only move them back (which would simply cause an early wakeup). If a vm_clock timer is cancelled while CPUs are idle, this might cause the icount_warp_timer to fire unnecessarily. This is not a problem, after it fires the timer becomes inactive and the next call to timer_mod_anticipate will be precise. In addition to this, we must deactivate the icount_warp_timer _before_ checking whether CPUs are idle. This way, if the "last" CPU becomes idle during the call to timer_del we will still set up the icount_warp_timer. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
To prepare for future code changes, move the increment of qemu_icount_bias outside the "if" statement. Also, hoist outside the if the check for timers that expired due to the "warping". The check is redundant when !runstate_is_running(), but doing it this way helps because the code that increments qemu_icount_bias will be a critical section. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
This will help later when we will have to place these calls in a critical section, and thus call a version of cpu_get_icount() that does not take the lock. Reviewed-by: NAlex Bligh <alex@alex.org.uk> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Liu Ping Fan 提交于
QEMU_CLOCK_VIRTUAL may be read outside BQL. This will make its foundation, i.e. cpu_clock_offset exposed to race condition. Using private lock to protect it. After this patch, reading QEMU_CLOCK_VIRTUAL is thread safe unless use_icount is true, in which case the existing callers still rely on the BQL. Lock rule: private lock innermost, ie BQL->"this lock" Signed-off-by: NLiu Ping Fan <pingfank@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 03 9月, 2013 2 次提交
-
-
由 Andreas Färber 提交于
It was introduced to loop over CPUs from target-independent code, but since commit 182735ef target-independent CPUState is used. A loop can be considered more efficient than function calls in a loop, and CPU_FOREACH() hides implementation details just as well, so use that instead. Suggested-by: NMarkus Armbruster <armbru@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthand macros. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 30 8月, 2013 1 次提交
-
-
There is the 'nmi' command that is used to trigger a guest dump via kdump feature on x86. s390 uses RESTART interrupt to trigger kdump. So, this patch provides a mean to use 'nmi' command on s390 to raise RESTART interrupt. The CPU to receive the RESTART interrupt is the "default" one. There is an infrastructure to select the "default" CPU using 'cpu' command. The 'info cpus' command can be used to see which one is the "default". In order to wire up the RESTART to 'nmi' command we had to: 1. implement the kvm_s390_cpu_restart function by exporting the existing code 2. implement s390_cpu_restart function as kvm-aware wrapper 3. modify the qmp_inject_nmi function to enable (for s390) the scan for "default" CPU and call s390_cpu_restart for it; 3. fix some messages. Signed-off-by: NEugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com> Acked-by: NAlexander Graf <agraf@suse.de>
-
- 23 8月, 2013 2 次提交
-
-
由 Alex Bligh 提交于
Rearrange timer.h so it is in order by function type. Make legacy functions call non-legacy functions rather than vice-versa. Convert cpus.c to use new API. Signed-off-by: NAlex Bligh <alex@alex.org.uk> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Alex Bligh 提交于
Notify all timerlists derived from vm_clock in icount warp calculations. When calculating timer delay based on vm_clock deadline, use all timerlists. For compatibility, maintain an apparent bug where when using icount, if no vm_clock timer was set, qemu_clock_deadline would return INT32_MAX and always set an icount clock expiry about 2 seconds ahead. NB: thread safety - when different timerlists sit on different threads, this will need some locking. Signed-off-by: NAlex Bligh <alex@alex.org.uk> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 17 8月, 2013 1 次提交
-
-
由 Tiejun Chen 提交于
It makes more sense and will make things simpler later. Signed-off-by: NTiejun Chen <tiejun.chen@windriver.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 27 7月, 2013 1 次提交
-
-
由 Liu Ping Fan 提交于
Signed-off-by: NLiu Ping Fan <pingfank@linux.vnet.ibm.com> Reviewed-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 23 7月, 2013 2 次提交
-
-
由 Andreas Färber 提交于
Propagate X86CPU in kvmvapic for simplicity. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Prepares for changing cpu_single_step() argument to CPUState. Acked-by: Michael Walle <michael@walle.cc> (for lm32) Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 19 7月, 2013 1 次提交
-
-
由 Kevin Wolf 提交于
Even if the VM is already stopped, we cannot assume that all data has already been successfully flushed to disk. The flush during the previous vm_stop() could have failed. Run bdrv_flush_all() unconditionally so that we get an error each time if the block device isn't really flushed. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 15 7月, 2013 1 次提交
-
-
由 Kevin Wolf 提交于
If flushing the block devices fails, return an error. The VM is stopped anyway. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 13 7月, 2013 1 次提交
-
-
由 Chegu Vinod 提交于
Introduce an asynchronous version of run_on_cpu() i.e. the caller doesn't have to block till the call back routine finishes execution on the target vcpu. Signed-off-by: NChegu Vinod <chegu_vinod@hp.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 10 7月, 2013 2 次提交
-
-
由 Andreas Färber 提交于
Move next_cpu from CPU_COMMON to CPUState. Move first_cpu variable to qom/cpu.h. gdbstub needs to use CPUState::env_ptr for now. cpu_copy() no longer needs to save and restore cpu_next. Acked-by: NPaolo Bonzini <pbonzini@redhat.com> [AF: Rebased, simplified cpu_copy()] Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Move it to qom/cpu.h. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 01 7月, 2013 1 次提交
-
-
由 Alexander Graf 提交于
On PPC, we don't support MP state. So far it's not necessary and I'm not convinced yet that we really need to support it ever. However, the current idle logic in QEMU assumes that an in-kernel PIC also means we support MP state. This assumption is not true anymore. Let's split up the two cases into two different variables. That way PPC can expose an in-kernel PIC, while not implementing MP state. Signed-off-by: NAlexander Graf <agraf@suse.de> CC: Jan Kiszka <jan.kiszka@siemens.com>
-
- 28 6月, 2013 13 次提交
-
-
由 Andreas Färber 提交于
This allows to move the call into CPUState's realizefn. Therefore move the stub into libqemustub.a. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Pass it to qemu_dummy_cpu_thread_fn(). Use CPUState::env_ptr for cpu_single_env. Prepares for changing qemu_init_vcpu() argument to CPUState. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Pass it on to qemu_kvm_cpu_thread_fn(). Prepares for changing qemu_init_vcpu() argument to CPUState. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
CPUArchState is no longer needed. Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Use CPUState::env_ptr for now. Prepares for changing cpu_handle_guest_debug() argument to CPUState. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
It no longer uses CPUArchState. Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState. Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Make cpustats monitor command available unconditionally. Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec() arguments to CPUState. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
CPUArchState is no longer needed. Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
CPUArchState is no longer needed. Prepares for changing qemu_kvm_init_cpu_signals() argument to CPUState. Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
It no longer uses CPUArchState. Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
It no longer needs CPUArchState. Prepares for changing all_cpu_threads_idle() CPU loop to CPUState and needed for changing qemu_kvm_wait_io_event() argument to CPUState. Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
It no longer depends on CPUArchState, so move it to qom/cpu.c. Prepares for changing GDBState::c_cpu to CPUState. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Change Monitor::mon_cpu to CPUState as well. Reviewed-by: Nliguang <lig.fnst@cn.fujitsu.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 17 6月, 2013 1 次提交
-
-
由 Luiz Capitulino 提交于
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Acked-by: NKevin Wolf <kwolf@redhat.com>
-
- 02 5月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
Due to a preceding while loop, no CPU would've been put into stopped state. Reinitialize the variable. This fixes commit d798e974 (Allow to use pause_all_vcpus from VCPU context) for non-KVM case. While at it, change a 0 to false, amending commit 4fdeee7c (cpu: Move stop field to CPUState). Reviewed-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 01 5月, 2013 2 次提交
-
-
由 Igor Mammedov 提交于
Replaces an open-coded loop and hides unused CPUArchState. Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Igor Mammedov 提交于
Also add a stub for it, to make possible to use it in qom/cpu.c, which is shared with user emulators. Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 19 4月, 2013 1 次提交
-
-
由 Stefan Weil 提交于
GetLastError() returns a DWORD value which is unsigned long, so the correct format specifier is %lu. Signed-off-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 16 4月, 2013 1 次提交
-
-
由 Igor Mammedov 提交于
... so it could be called without requiring CPUArchState. Signed-off-by: NIgor Mammedov <imammedo@redhat.com> Reviewed-by: NEduardo Habkost <ehabkost@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
-