summaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-02-24 12:59:13 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-02-24 12:59:14 +0000
commit3dc10613c313a042a111e46a977733411495ea8c (patch)
treeea992fe32d4272c169d7d9f1fd43c621a80aa2d5 /cpus.c
parent3dd2d1a33976a7ec4aa3a6a29e5183af53949237 (diff)
parentb9c649470ba0d4056b2d486105a0f8fb982654ae (diff)
downloadqemu-3dc10613c313a042a111e46a977733411495ea8c.tar.gz
qemu-3dc10613c313a042a111e46a977733411495ea8c.tar.bz2
qemu-3dc10613c313a042a111e46a977733411495ea8c.zip
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request v2: * Fix C11 typedef redefinitions in ahci and libqos malloc [Peter] * Fix lx -> PRIx64 format specifiers in ahci [Peter] # gpg: Signature made Mon Feb 16 15:45:53 2015 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: (65 commits) block: Keep bdrv_check*_request()'s return value block: Remove "growable" from BDS block: Clamp BlockBackend requests qemu-io: Use BlockBackend qemu-io: Remove "growable" option qemu-io: Use blk_new_open() in openfile() qemu-nbd: Use blk_new_open() in main() qemu-img: Use BlockBackend as far as possible qemu-img: Use blk_new_open() in img_rebase() qemu-img: Use blk_new_open() in img_open() block/xen: Use blk_new_open() in blk_connect() blockdev: Use blk_new_open() in blockdev_init() iotests: Add test for driver=qcow2, format=qcow2 block: Add Error parameter to bdrv_find_protocol() block: Add blk_new_open() block: Lift some BDS functions to the BlockBackend iotests: Add test for qemu-img convert to NBD qemu-img: Fix qemu-img convert -n qemu-iotests: Add 093 for IO throttling qemu-iotests: Allow caller to disable underscore convertion for qmp ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpus.c b/cpus.c
index 0cdd1d7156..97939e4d9e 100644
--- a/cpus.c
+++ b/cpus.c
@@ -361,15 +361,19 @@ static void icount_warp_rt(void *opaque)
void qtest_clock_warp(int64_t dest)
{
int64_t clock = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
+ AioContext *aio_context;
assert(qtest_enabled());
+ aio_context = qemu_get_aio_context();
while (clock < dest) {
int64_t deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL);
int64_t warp = qemu_soonest_timeout(dest - clock, deadline);
+
seqlock_write_lock(&timers_state.vm_clock_seqlock);
timers_state.qemu_icount_bias += warp;
seqlock_write_unlock(&timers_state.vm_clock_seqlock);
qemu_clock_run_timers(QEMU_CLOCK_VIRTUAL);
+ timerlist_run_timers(aio_context->tlg.tl[QEMU_CLOCK_VIRTUAL]);
clock = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
}
qemu_clock_notify(QEMU_CLOCK_VIRTUAL);