- 13 12月, 2011 1 次提交
-
-
由 Jan Kiszka 提交于
Split from Jan's original qemu-thread-posix.c patch. No semantic change, just introduce the new API that POSIX and Win32 implementations will conform to. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 06 12月, 2011 4 次提交
-
-
由 Luiz Capitulino 提交于
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
Please, note that the QMP command has a new 'cpu-index' parameter. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Dong Xu Wang 提交于
Double semicolons should be single. Signed-off-by: NDong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 05 12月, 2011 1 次提交
-
-
由 Stefan Hajnoczi 提交于
Many places in QEMU call qemu_aio_flush() to complete all pending asynchronous I/O. Most of these places actually want to drain all block requests but there is no block layer API to do so. This patch introduces the bdrv_drain_all() API to wait for requests across all BlockDriverStates to complete. As a bonus we perform checks after qemu_aio_wait() to ensure that requests really have finished. Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 02 12月, 2011 1 次提交
-
-
由 Dong Xu Wang 提交于
Signed-off-by: NDong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 08 11月, 2011 1 次提交
-
-
由 Wen Congyang 提交于
We disable vm_clock when pausing all vcpus, but we forget to reenable it when resuming all vcpus. It will cause that the guest can not be rebooted. Tested-by: NZhi Yong Wu <zwu.kernel@gmai.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NWen Congyang <wency@cn.fujitsu.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 01 11月, 2011 1 次提交
-
-
由 Jan Kiszka 提交于
After the removal of the non-threaded mode cpu_exec_all is now only used by TCG. Refactor it accordingly, also dropping its unused return value. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 27 10月, 2011 1 次提交
-
-
由 Luiz Capitulino 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 22 10月, 2011 5 次提交
-
-
由 Paolo Bonzini 提交于
Provide a clean example of how to use the main loop in the tools. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
None of this is needed by tools, and most of it can even be made static inside cpus.c. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 19 10月, 2011 1 次提交
-
-
由 Luiz Capitulino 提交于
It should be a matter of allowing the transition POSTMIGRATE -> FINISH_MIGRATE, but it turns out that the VM won't do the transition the second time because it's already stopped. So this commit also adds vm_stop_force_state() which performs the transition even if the VM is already stopped. While there also allow other states to migrate. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 20 9月, 2011 1 次提交
-
-
由 Frediano Ziglio 提交于
Now that iothread is always compiled sending a signal seems only an additional step. This patch also avoid writing to two pipe (one from signal and one in qemu_service_io). Work with kvm enabled or disabled. strace output is more readable (less syscalls). [ kwolf: Merged build fix by Paolo Bonzini ] Signed-off-by: NFrediano Ziglio <freddy77@gmail.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 16 9月, 2011 3 次提交
-
-
由 Luiz Capitulino 提交于
Use runstate_is_running() instead, which is introduced by this commit. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
Currently, only vm_start() and vm_stop() change the VM state. That's, the state is only changed when starting or stopping the VM. This commit adds the runstate_set() function, which makes it possible to also do state transitions when the VM is stopped or running. Additional states are also added and the current state is stored. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
由 Luiz Capitulino 提交于
Today, when notifying a VM state change with vm_state_notify(), we pass a VMSTOP macro as the 'reason' argument. This is not ideal because the VMSTOP macros tell why qemu stopped and not exactly what the current VM state is. One example to demonstrate this problem is that vm_start() calls vm_state_notify() with reason=0, which turns out to be VMSTOP_USER. This commit fixes that by replacing the VMSTOP macros with a proper state type called RunState. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 02 9月, 2011 1 次提交
-
-
由 Anthony Liguori 提交于
Enabling the I/O thread by default seems like an important part of declaring 1.0. Besides allowing true SMP support with KVM, the I/O thread means that the TCG VCPU doesn't have to multiplex itself with the I/O dispatch routines which currently requires a (racey) signal based alarm system. I know there have been concerns about performance. I think so far the ones that have come up (virtio-net) are most likely due to secondary reasons like decreased batching. I think we ought to force enabling I/O thread early in 1.0 development and commit to resolving any lingering issues. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 23 8月, 2011 2 次提交
-
-
由 Jan Kiszka 提交于
We can express the VCPU thread wakeup with the stop mechanism, saving both qemu_system_ready and the qemu_system_cond. For KVM threads, we can just enter the main loop as long as the thread is stopped. The central TCG thread is better held back before the loop as there can be side effects of the services called even when all CPUs are stopped. Creating VCPUs in stopped state will also be required for proper CPU hotplugging support. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jan Kiszka 提交于
In TCG mode, iothread and vcpus run in lock-step. So it's pointless to send a signal from qemu_cpu_kick to the vcpu thread - if we got here, the receiver already left the vcpu loop. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 21 8月, 2011 1 次提交
-
-
由 Anthony Liguori 提交于
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 24 7月, 2011 1 次提交
-
-
由 Paolo Bonzini 提交于
This conveys the intention better, and scales to more than >1 threads contending the mutex with the iothread (as long as all of them have a "quiescent point" like the TCG thread has). Also, on Mac OS X the fair_mutex somehow didn't work as intended and deadlocked. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Tested-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 17 7月, 2011 2 次提交
-
-
由 Alexandre Raymond 提交于
Both the signal thread (via sigwait()) and the cpu thread (via a normal signal handler) were attempting to catch SIG_IPI. This resulted in random freezes under Darwin. This patch separates SIG_IPI from the rest of the signals handled by the signal thread, because it is independently caught by the cpu thread. Signed-off-by: NAlexandre Raymond <cerbere@gmail.com> Acked-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexandre Raymond 提交于
Changes since v1: - take pthread_sigmask() out of the ifdef as it is now common to both parts. This fix effectively blocks, in the main thread, the signals handled by signalfd or the compatibility signal thread. This way, such signals are received synchronously in the main thread through sigfd_handler() instead of triggering the signal handler directly, asynchronously. Signed-off-by: NAlexandre Raymond <cerbere@gmail.com> Acked-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 27 6月, 2011 1 次提交
-
-
由 Blue Swirl 提交于
Most exec-all.h include directives are now useless, remove them. Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 24 6月, 2011 1 次提交
-
-
由 Jan Kiszka 提交于
sigset_t, used by that header, is not available in mingw32 environments. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 20 6月, 2011 1 次提交
-
-
由 Alexandre Raymond 提交于
filed -> failed Signed-off-by: NAlexandre Raymond <cerbere@gmail.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 16 6月, 2011 1 次提交
-
-
由 Matthew Fernandez 提交于
Add command line support for logging to a location other than /tmp/qemu.log. With logging enabled (command line option -d), the log is written to the hard-coded path /tmp/qemu.log. This patch adds support for writing the log to a different location by passing the -D option. Signed-off-by: NMatthew Fernandez <matthew.fernandez@gmail.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 15 4月, 2011 3 次提交
-
-
由 Paolo Bonzini 提交于
It is purely for icount-based virtual timers. And now that we got the code right, rename the function to clarify the intended scope. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Tested-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Paolo Bonzini 提交于
The previous patch however is not enough, because if the virtual CPU goes to sleep waiting for a future timer interrupt to wake it up, qemu deadlocks. The timer interrupt never comes because time is driven by icount, but the vCPU doesn't run any insns. You could say that VCPUs should never go to sleep in icount mode if there is a pending vm_clock timer; rather time should just warp to the next vm_clock event with no sleep ever taking place. Even better, you can sleep for some time related to the time left until the next event, to avoid that the warps are too visible externally; for example, you could be sending network packets continously instead of every 100ms. This is what this patch implements. qemu_clock_warp is called: 1) whenever a vm_clock timer is adjusted, to ensure the warp_timer is synchronized; 2) at strategic points in the CPU thread, to make sure the insn counter is synchronized before the CPU starts running. In any case, the warp_timer is disabled while the CPU is running, because the insn counter will then be making progress on its own. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Tested-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Paolo Bonzini 提交于
The correct fix for -icount is to consider the biggest difference between iothread and non-iothread modes. In the traditional model, CPUs run _before_ the iothread calls select (or WaitForMultipleObjects for Win32). In the iothread model, CPUs run while the iothread isn't holding the mutex, i.e. _during_ those same calls. So, the iothread should always block as long as possible to let the CPUs run smoothly---the timeout might as well be infinite---and either the OS or the CPU thread itself will let the iothread know when something happens. At this point, the iothread wakes up and interrupts the CPU. This is exactly the approach that this patch takes: when cpu_exec_all returns in -icount mode, and it is because a vm_clock deadline has been met, it wakes up the iothread to process the timers. This is really the "bulk" of fixing icount. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Tested-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
- 21 3月, 2011 1 次提交
-
-
由 Stefan Weil 提交于
Here the int values fds[0], sigfd, s, sock and fd are converted to void pointers which are later converted back to an int value. These conversions should always use intptr_t instead of unsigned long. They are needed for environments where sizeof(long) != sizeof(void *). Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 17 3月, 2011 2 次提交
-
-
由 Jan Kiszka 提交于
Based on patch by Glauber Costa: To allow management applications like libvirt to apply CPU affinities to the VCPU threads, expose their ID via info cpus. This patch provides the pre-existing and used interface from qemu-kvm. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
-
由 Jan Kiszka 提交于
With in-kernel irqchip support enabled, the vcpu threads sleep in kernel space while halted. Account for this difference in cpu_thread_is_idle. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
-
- 16 3月, 2011 2 次提交
-
-
由 Jan Kiszka 提交于
Commit 83f338f7 broke x86 hardware breakpoint emulation by moving the debug exception handling out of cpu_exec. Fix this by moving all TCG related bits back, only leaving the generic guest debugging parts in cpus.c. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> CC: TeLeMan <geleman@gmail.com> Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
-
由 Jan Kiszka 提交于
qemu_kvm_eat_signals requires POSIX support with realtime extensions for sigtimedwait. Not all our target platforms provide this. Moreover, undefined sigbus_reraise was referenced on non-Linux as well. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> CC: Andreas Färber <andreas.faerber@web.de> Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
-
- 13 3月, 2011 1 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-