qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 3/3] icount: print a warning if there is no m


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


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 <address@hidden>
> ---
>  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 via email to

[Prev in Thread] Current Thread [Next in Thread]