qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Victor CLEMENT <victor.clement@openwide.fr>, qemu-devel@nongnu.org
Cc: francois.guerret@hotmail.fr, julien.viarddegalbert@openwide.fr
Subject: Re: [Qemu-devel] [PATCH v2 3/3] icount: print a warning if there is no more deadline in sleep=no mode
Date: Fri, 29 May 2015 18:38:29 +0200	[thread overview]
Message-ID: <55689605.8070308@redhat.com> (raw)
In-Reply-To: <1432912446-9811-4-git-send-email-victor.clement@openwide.fr>



On 29/05/2015 17:14, Victor CLEMENT wrote:
> While qemu is running in sleep=no mode, a warning will be printed
> when no timer deadline is set.
> As this mode is intended for getting deterministic virtual time, if no
> timer is set on the virtual clock this determinism is broken.
> 
> Signed-off-by: Victor CLEMENT <victor.clement@openwide.fr>
> ---
>  cpus.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/cpus.c b/cpus.c
> index 4e90e63..aec17b6 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -419,6 +419,12 @@ void qemu_clock_warp(QEMUClockType type)
>      clock = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL_RT);
>      deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL);
>      if (deadline < 0) {
> +        static bool notified;
> +        if (!icount_sleep && !notified) {
> +            fprintf(stderr, "cpus: WARNING: icount sleep disabled and no more \
> +active timer\n");

I'm changing this to error_report, and queuing the series for 2.4 with
no other changes.  Expect it to be in a pull request next week!

Paolo

> +            notified = true;
> +        }
>          return;
>      }
>  
> 

      reply	other threads:[~2015-05-29 16:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-29 15:14 [Qemu-devel] [PATCH v2 0/3] implement a new icount sleep=no mode Victor CLEMENT
2015-05-29 15:14 ` [Qemu-devel] [PATCH v2 1/3] icount: implement a new icount_sleep mode toggleing real-time cpu sleep Victor CLEMENT
2015-05-29 15:14 ` [Qemu-devel] [PATCH v2 2/3] icount: add sleep parameter to the icount option to set icount_sleep mode Victor CLEMENT
2015-05-29 15:14 ` [Qemu-devel] [PATCH v2 3/3] icount: print a warning if there is no more deadline in sleep=no mode Victor CLEMENT
2015-05-29 16:38   ` Paolo Bonzini [this message]

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=55689605.8070308@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=francois.guerret@hotmail.fr \
    --cc=julien.viarddegalbert@openwide.fr \
    --cc=qemu-devel@nongnu.org \
    --cc=victor.clement@openwide.fr \
    /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).