qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: pavel.dovgaluk@ispras.ru, boost.lists@gmail.com,
	victor.clement@openwide.fr, Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v1 1/2] qemu-timer: gracefully handle the end of time
Date: Tue, 28 Jul 2020 16:42:14 +0200	[thread overview]
Message-ID: <f48c70d8-b506-e86c-e0dd-9e0ed2db3d91@redhat.com> (raw)
In-Reply-To: <20200728141005.28664-2-alex.bennee@linaro.org>

On 28/07/20 16:10, Alex Bennée wrote:
> +    /*
> +     * Check to see if we have run out of time. Most of our time
> +     * sources are nanoseconds since epoch (some time around the fall
> +     * of Babylon 5, the start of the Enterprises five year mission
> +     * and just before the arrival of the great evil ~ 2262CE).
> +     * Although icount based time is ns since the start of emulation
> +     * it is able to skip forward if the device is sleeping (think IoT
> +     * device with a very long heartbeat). Either way we don't really
> +     * handle running out of time so lets catch it and report it here.
> +     */
> +    if (current_time == INT64_MAX) {
> +        qemu_handle_outa_time();
> +        goto out;
> +    }
> +

Doing this here is a bit dangerous, I'd rather do nothing here and
detect the situation in cpus.c where we can do
qemu_system_shutdown_request() (and also do nothing).

Paolo



  reply	other threads:[~2020-07-28 14:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28 14:10 [PATCH v1 0/2] clean-ups for sleep=off behaviour Alex Bennée
2020-07-28 14:10 ` [PATCH v1 1/2] qemu-timer: gracefully handle the end of time Alex Bennée
2020-07-28 14:42   ` Paolo Bonzini [this message]
2020-07-28 16:08     ` Alex Bennée
2020-07-28 16:58       ` Paolo Bonzini
2020-07-28 14:10 ` [PATCH v1 2/2] target/arm: only set the nexttick timer if !ISTATUS Alex Bennée
2020-07-28 14:16   ` Peter Maydell
2020-07-28 16:11     ` Alex Bennée
2020-07-28 16:23       ` Peter Maydell

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=f48c70d8-b506-e86c-e0dd-9e0ed2db3d91@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=boost.lists@gmail.com \
    --cc=pavel.dovgaluk@ispras.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --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).