qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Victor CLEMENT <victor.clement@openwide.fr>
To: qemu-devel@nongnu.org
Cc: francois.guerret@hotmail.fr, Victor CLEMENT <victor.clement@openwide.fr>
Subject: [Qemu-devel] [PATCH 0/3] implement a new icount_no_rt mode
Date: Wed, 27 May 2015 13:52:00 +0200	[thread overview]
Message-ID: <1432727523-2008-1-git-send-email-victor.clement@openwide.fr> (raw)

This patch adds a new icount_no_rt mode set by the new 'rt' parameter
of the icount option.
When using icount_no_rt mode, the QEMU_VIRTUAL_CLOCK will be running at
the maximal possible speed by warping the CPU sleep times to the soonest
virtual clock deadline.
The goal is to get deterministic execution times by preventing potential
latencies from qemu execution on the host machine.
The virtual cpus sleep time will be calculated but not spent, hence the
virtual time will not be realistic when looking from the host point of view
(ex. a 'sleep 10' on the guest will return almost instantly while the
guest clock wil act like 10s have really passed)

This new mode will be used for testing real-time applications inside qemu.
It makes the virtual clock "purely" virtual by removing any reference to
host clocks in the calculation of QEMU_VIRTUAL_CLOCK value.
Thus, some emulated devices which use other clocks as reference will not
work in this mode. The virtual time would be running too fast compared
to the actual "real" time.

To use this mode, one need to modify some emulators to simulate scenario
using the virtual clock and report some events using the virtual clock
too.
This kind of changes cannot be generic as the scenario will depend
on the tested application, so modified emulators are not part of this
patch set.

Victor CLEMENT (3):
  icount: implement a new icount_no_rt mode without real time cpu
    sleeping
  icount: add rt parameter to the -icount option to toogle icount_no_rt
    mode
  icount: print a warning if there is no more deadline in no_rt mode

 cpus.c          | 85 +++++++++++++++++++++++++++++++++++++++------------------
 qemu-options.hx | 12 ++++++--
 vl.c            |  3 ++
 3 files changed, 72 insertions(+), 28 deletions(-)

-- 
2.3.7

             reply	other threads:[~2015-05-27 11:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 11:52 Victor CLEMENT [this message]
2015-05-27 11:52 ` [Qemu-devel] [PATCH 1/3] icount: implement a new icount_no_rt mode without real time cpu sleeping Victor CLEMENT
2015-05-27 12:52   ` Paolo Bonzini
2015-05-29  8:59     ` Victor Clement
2015-05-27 11:52 ` [Qemu-devel] [PATCH 2/3] icount: add rt parameter to the -icount option to toogle icount_no_rt mode Victor CLEMENT
2015-05-27 11:52 ` [Qemu-devel] [PATCH 3/3] icount: print a warning if there is no more deadline in no_rt mode Victor CLEMENT
2015-05-27 12:52 ` [Qemu-devel] [PATCH 0/3] implement a new icount_no_rt mode Paolo Bonzini
2015-05-29  8:54   ` Victor Clement
2015-05-29 11:14     ` Paolo Bonzini
2015-05-29 15:06       ` Victor Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432727523-2008-1-git-send-email-victor.clement@openwide.fr \
    --to=victor.clement@openwide.fr \
    --cc=francois.guerret@hotmail.fr \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).