summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'sweil/mingw' into stable-1.5Anthony Liguori2013-08-293-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Stefan Weil # Via Stefan Weil * sweil/mingw: gtk: Remove unused include statements which are not portable w32: Add an icon resource w32: Fix broken out-of-tree builds (missing version.o) Message-id: 1377607132-21336-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
| * | gtk: Remove unused include statements which are not portableStefan Weil2013-08-271-4/+0
| | | | | | | | | | | | | | | | | | | | | These include files don't exist for MinGW and are not needed for Linux (and hopefully for other hosts as well), so remove them. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | w32: Add an icon resourceStefan Weil2013-08-271-0/+2
| | | | | | | | | | | | | | | | | | | | | The QEMU mascot which was already used for the NSIS installer is now used for all QEMU executables. Signed-off-by: Stefan Weil <sw@weilnetz.de>
| * | w32: Fix broken out-of-tree builds (missing version.o)Stefan Weil2013-08-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0b516ef0dfad9a7b34c675c98e8ec92ab4d38466 added version.o to all executables, but broke out-of-tree builds: for those builds the pattern rule %.o: %.rc from rules.mak does not match, so version.o was no longer built. Adding explicit build rules fixes this. Reported-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
* | | Merge remote-tracking branch 'mst/tags/for_anthony' into stable-1.5Anthony Liguori2013-08-2913-270/+231
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pc,pci,virtio fixes and cleanups This includes pc and pci cleanups, future-proofing of ROM files, and a virtio bugfix correcting splice on virtio console. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 26 Aug 2013 01:34:20 AM CDT using RSA key ID D28D5469 # gpg: Can't check signature: public key not found # By Markus Armbruster (5) and others # Via Michael S. Tsirkin * mst/tags/for_anthony: virtio: virtqueue_get_avail_bytes: fix desc_pa when loop over the indirect descriptor table pc_piix: Kill pc_init1() memory region args pc: pc_compat_1_4() now can call pc_compat_1_5() pc: Create pc_compat_*() functions pc: Kill pc_init_pci_1_0() pc: Don't explode QEMUMachineInitArgs into local variables needlessly pc: Don't prematurely explode QEMUMachineInitArgs ppc: Don't duplicate QEMUMachineInitArgs in PPCE500Params ppc: Don't explode QEMUMachineInitArgs into local variables needlessly sun4: Don't prematurely explode QEMUMachineInitArgs q35: Add PCIe switch to example q35 configuration loader: store FW CFG ROM files in RAM arch_init: align MR size to target page size pc: cleanup 1.4 compat support Message-id: 1377535318-30491-1-git-send-email-mst@redhat.com
| * | | virtio: virtqueue_get_avail_bytes: fix desc_pa when loop over the indirect ↵yinyin2013-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | descriptor table virtqueue_get_avail_bytes: when found a indirect desc, we need loop over it. /* loop over the indirect descriptor table */ indirect = 1; max = vring_desc_len(desc_pa, i) / sizeof(VRingDesc); num_bufs = i = 0; desc_pa = vring_desc_addr(desc_pa, i); But, It init i to 0, then use i to update desc_pa. so we will always get: desc_pa = vring_desc_addr(desc_pa, 0); the last two line should swap. Cc: qemu-stable@nongnu.org Signed-off-by: Yin Yin <yin.yin@cs2c.com.cn> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pc_piix: Kill pc_init1() memory region argsEduardo Habkost2013-08-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All callers always use the same values (get_system_memory(), get_system_io()), so the parameters are pointless. If one day we decide to eliminate get_system_memory() and get_system_io(), we will be able to do that more easily by adding the values to struct QEMUMachineInitArgs. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pc: pc_compat_1_4() now can call pc_compat_1_5()Eduardo Habkost2013-08-212-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It just needs to set has_pvpanic=false after calling it. This way, it won't be a special case anymore. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pc: Create pc_compat_*() functionsEduardo Habkost2013-08-212-18/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making the older compat functions call the newer compat functions at the beginning allows the older functions undo what's done by newer compat functions. e.g.: pc_compat_1_4() will be able to call pc_compat_1_5() and then set has_pvpanic=false. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pc: Kill pc_init_pci_1_0()Eduardo Habkost2013-08-211-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pc_init_pci_1_2()/pc_init_pci_1_0() split was made on commit 6fd028f64f662c801fd5a54d0e3a1d2baeee93ea, in preparation for commit 9953f8822cc316eec9962f0a2858c3439a80adec. The latter was reverted, so there's no reason to keep two separate functions that do exactly the same, anymore. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pc: Don't explode QEMUMachineInitArgs into local variables needlesslyMarkus Armbruster2013-08-211-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't explode when the variable is used just a few times, and never changed. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pc: Don't prematurely explode QEMUMachineInitArgsMarkus Armbruster2013-08-211-49/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't explode QEMUMachineInitArgs before passing it to pc_init1(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | ppc: Don't duplicate QEMUMachineInitArgs in PPCE500ParamsMarkus Armbruster2013-08-214-41/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass on the generic arguments unadulterated, and the machine-specific ones as separate argument. Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Alexander Graf <agraf@suse.de> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | ppc: Don't explode QEMUMachineInitArgs into local variables needlesslyMarkus Armbruster2013-08-212-24/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't explode when the variable is used just once, and never changed. Signed-off-by: Markus Armbruster <armbru@redhat.com> Acked-by: Alexander Graf <agraf@suse.de> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | sun4: Don't prematurely explode QEMUMachineInitArgsMarkus Armbruster2013-08-212-125/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't explode QEMUMachineInitArgs before passing it to sun4m_hw_init(), sun4uv_init(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | q35: Add PCIe switch to example q35 configurationAlex Williamson2013-08-211-0/+23
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | loader: store FW CFG ROM files in RAMMichael S. Tsirkin2013-08-214-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ROM files that are put in FW CFG are copied to guest ram, by BIOS, but they are not backed by RAM so they don't get migrated. Each time we change two bytes in such a ROM this breaks cross-version migration: since we can migrate after BIOS has read the first byte but before it has read the second one, getting an inconsistent state. Future-proof this by creating, for each such ROM, an MR serving as the backing store. This MR is never mapped into guest memory, but it's registered as RAM so it's migrated with the guest. Naturally, this only helps for -M 1.7 and up, older machine types will still have the cross-version migration bug. Luckily the race window for the problem to trigger is very small, which is also likely why we didn't notice the cross-version migration bug in testing yet. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
| * | | arch_init: align MR size to target page sizeMichael S. Tsirkin2013-08-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migration code assumes that each MR is a multiple of TARGET_PAGE_SIZE: MR size is divided by TARGET_PAGE_SIZE, so if it isn't migration never completes. But this isn't really required for regions set up with memory_region_init_ram, since that calls qemu_ram_alloc which aligns size up using TARGET_PAGE_ALIGN. Align MR size up to full target page sizes, this way migration completes even if we create a RAM MR which is not a full target page size. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
| * | | pc: cleanup 1.4 compat supportMichael S. Tsirkin2013-08-212-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make 1.4 compat code call the 1.6 one, reducing code duplication. Add comment explaining why we can't make 1.4 call 1.5 as usual. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
* | | | tcg-i386: Remove abort from GETPC_LDSTRichard Henderson2013-08-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Indeed, remove it entirely and remove the is_tcg_gen_code check from GETPC_EXT. Fixes https://bugs.launchpad.net/qemu/+bug/1218098 wherein a call to a "normal" helper function performed a sequence of tail calls all the way into the memory helper functions, leading to a stack frame in which the memory helper function appeared to be called directly from tcg. Signed-off-by: Richard Henderson <rth@twiddle.net>
* | | | target-mips: fix get_physical_address() #if 0 build errorJames Hogan2013-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In get_physical_address() is a qemu_log() call inside an #if 0 block. When enabled the following build error is hit: target-mips/helper.c In function ‘get_physical_address’: target-mips/helper.c:220:13: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘hwaddr’ [-Werror=format] Fix the *physical (hwaddr) formatting by using "%"HWADDR_PRIx instead of TARGET_FMT_lx. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | | | tcg-i386: Use new return-argument ld/st helpersRichard Henderson2013-08-262-67/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discontinue the jump-around-jump-to-jump scheme, trading it for a single immediate move instruction. The two extra jumps always consume 7 bytes, whereas the immediate move is either 5 or 7 bytes depending on where the code_gen_buffer gets located. Signed-off-by: Richard Henderson <rth@twiddle.net>
* | | | tcg: Tidy softmmu_template.hRichard Henderson2013-08-261-183/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid a loop in the tlb_fill path; the fill will either succeed or generate an exception. Inline the slow_ld/st function; it was a complete copy of the main helper except for the actual cross-page unaligned code, and the compiler was inlining it anyway. Add unlikely markers optimizing for the most common case of simple tlb miss. Make sure the compiler can optimize away the unaligned paths for a 1 byte access. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
* | | | tcg: Add mmu helpers that take a return address argumentRichard Henderson2013-08-262-33/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the code that tcg generates to be less obtuse, passing in the return address directly instead of computing it in the helper. Maintain the old entrance point unchanged as an alternate entry point. Delete the helper_st*_cmmu prototypes; the implementations did not exist. Signed-off-by: Richard Henderson <rth@twiddle.net>
* | | | tcg-i386: Tidy qemu_ld/st slow pathRichard Henderson2013-08-261-91/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use existing stack space for arguments; don't push/pop. Use less ifdefs and more C ifs. Signed-off-by: Richard Henderson <rth@twiddle.net>
* | | | tcg-i386: Try pc-relative lea for constant formationRichard Henderson2013-08-261-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | Use a 7 byte lea before the ultimate 10 byte movq. Signed-off-by: Richard Henderson <rth@twiddle.net>
* | | | tcg-i386: Add and use tcg_out64Richard Henderson2013-08-262-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No point in splitting the write into 32-bit pieces. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
* | | | tcg: Tidy generated code for tcg_outNRichard Henderson2013-08-261-4/+6
| |/ / |/| | | | | | | | | | | | | | | | | Aliasing was forcing s->code_ptr to be re-read after the store. Keep the pointer in a local variable to help the compiler. Signed-off-by: Richard Henderson <rth@twiddle.net>
* | | Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori2013-08-26177-1503/+2362
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Alex Bligh (32) and others # Via Stefan Hajnoczi * stefanha/block: (42 commits) win32-aio: drop win32_aio_flush_cb() aio-win32: replace incorrect AioHandler->opaque usage with ->e aio / timers: remove dummy_io_handler_flush from tests/test-aio.c aio / timers: Remove legacy interface aio / timers: Switch entire codebase to the new timer API aio / timers: Add scripts/switch-timer-api aio / timers: Add test harness for AioContext timers aio / timers: convert block_job_sleep_ns and co_sleep_ns to new API aio / timers: Convert rtc_clock to be a QEMUClockType aio / timers: Remove main_loop_timerlist aio / timers: Rearrange timer.h & make legacy functions call non-legacy aio / timers: Add qemu_clock_get_ms and qemu_clock_get_ms aio / timers: Remove legacy qemu_clock_deadline & qemu_timerlist_deadline aio / timers: Remove alarm timers aio / timers: Add documentation and new format calls aio / timers: Use all timerlists in icount warp calculations aio / timers: Introduce new API timer_new and friends aio / timers: On timer modification, qemu_notify or aio_notify aio / timers: Convert mainloop to use timeout aio / timers: Convert aio_poll to use AioContext timers' deadline ... Message-id: 1377202298-22896-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
| * | | win32-aio: drop win32_aio_flush_cb()Stefan Hajnoczi2013-08-221-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The io_flush argument to qemu_aio_set_event_notifier() has been removed since the block layer learnt to drain requests by itself. Fix the Windows build for win32-aio.o by updating the qemu_aio_set_event_notifier() call and dropping win32_aio_flush_cb(). Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio-win32: replace incorrect AioHandler->opaque usage with ->eStefan Hajnoczi2013-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AioHandler->opaque field does not exist in aio-win32.c. The code that uses it was incorrectly copied from aio-posix.c. For Windows we can use AioHandler->e to match against AioContext->notifier. This patch fixes the Windows build for aio-win32.o. Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: remove dummy_io_handler_flush from tests/test-aio.cAlex Bligh2013-08-221-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove dummy_io_handler_flush from tests/test-aio.c as it does nothing now. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Remove legacy interfaceAlex Bligh2013-08-222-244/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the legacy interface from include/qemu/timers.h. Ensure struct QEMUClock is not exposed at all. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Switch entire codebase to the new timer APIAlex Bligh2013-08-22121-678/+678
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Add scripts/switch-timer-apiAlex Bligh2013-08-221-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add scripts/switch-timer-api to programatically rewrite source files to use the new timer system. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Add test harness for AioContext timersAlex Bligh2013-08-221-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test harness for AioContext timers. The g_source equivalent is unsatisfactory as it suffers from false wakeups. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: convert block_job_sleep_ns and co_sleep_ns to new APIAlex Bligh2013-08-228-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert block_job_sleep_ns and co_sleep_ns to use the new timer API. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Convert rtc_clock to be a QEMUClockTypeAlex Bligh2013-08-2210-55/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert rtc_clock to be a QEMUClockType Move rtc_clock users to use the new API Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Remove main_loop_timerlistAlex Bligh2013-08-222-41/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we have timerlistgroups implemented and main_loop_tlg, we no longer need the concept of a default timer list associated with each clock. Remove it and simplify initialisation of clocks and timer lists. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Rearrange timer.h & make legacy functions call non-legacyAlex Bligh2013-08-2211-377/+477
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Add qemu_clock_get_ms and qemu_clock_get_msAlex Bligh2013-08-221-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add utility functions qemu_clock_get_ms and qemu_clock_get_us Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Remove legacy qemu_clock_deadline & qemu_timerlist_deadlineAlex Bligh2013-08-222-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove qemu_clock_deadline and qemu_timerlist_deadline now we are using the ns functions throughout. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Remove alarm timersAlex Bligh2013-08-224-507/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove alarm timers from qemu-timers.c now we use g_poll / ppoll instead. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Add documentation and new format callsAlex Bligh2013-08-221-22/+184
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add documentation for existing qemu timer calls. Add new format calls of the format timer_XXX rather than qemu_XXX_timer for consistency. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Use all timerlists in icount warp calculationsAlex Bligh2013-08-224-10/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Introduce new API timer_new and friendsAlex Bligh2013-08-221-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new API for creating timers - timer_new and _ns, _ms, _us derivatives. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: On timer modification, qemu_notify or aio_notifyAlex Bligh2013-08-222-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On qemu_mod_timer_ns, ensure qemu_notify or aio_notify is called to end the appropriate poll(), irrespective of use_icount value. On qemu_clock_enable, ensure qemu_notify or aio_notify is called for all QEMUTimerLists attached to the QEMUClock. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Convert mainloop to use timeoutAlex Bligh2013-08-221-14/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert mainloop to use timeout from default timerlist group (i.e. the current 3 static timers) main-loop.c produces a (possibly spurious) warning about multiple iterations. Adapt the way this works for a signed timeout and make the warning a bit safer. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Convert aio_poll to use AioContext timers' deadlineAlex Bligh2013-08-222-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert aio_poll to use deadline based on AioContext's timers. aio_poll has been changed to return accurately whether progress has occurred. Prior to this commit, aio_poll always returned true if g_poll was entered, whether or not any progress was made. This required a change to tests/test-aio.c where an assert was backwards. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | | aio / timers: Add aio_timer_init & aio_timer_new wrappersAlex Bligh2013-08-221-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add aio_timer_init and aio_timer_new wrapper functions. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
OpenPOWER on IntegriCloud