All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: pavel.dovgaluk@ispras.ru, boost.lists@gmail.com,
	qemu-devel@nongnu.org, 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 17:08:26 +0100	[thread overview]
Message-ID: <87o8nz39mt.fsf@linaro.org> (raw)
In-Reply-To: <f48c70d8-b506-e86c-e0dd-9e0ed2db3d91@redhat.com>


Paolo Bonzini <pbonzini@redhat.com> writes:

> 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).

You mean in notify_aio_contexts()? Sure we can do that.

I also figured it might be worth cleaning up the return progress stuff
because AFAICT no one seems to care.

>
> Paolo


-- 
Alex Bennée


  reply	other threads:[~2020-07-28 16:09 UTC|newest]

Thread overview: 13+ 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
2020-07-28 16:08     ` Alex Bennée [this message]
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:10   ` Alex Bennée
2020-07-28 14:16   ` Peter Maydell
2020-07-28 14:16     ` Peter Maydell
2020-07-28 16:11     ` Alex Bennée
2020-07-28 16:11       ` Alex Bennée
2020-07-28 16:23       ` Peter Maydell
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=87o8nz39mt.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=boost.lists@gmail.com \
    --cc=pavel.dovgaluk@ispras.ru \
    --cc=pbonzini@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.