qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v1 1/2] qemu-timer: gracefully handle the end of time


From: Alex Bennée
Subject: Re: [PATCH v1 1/2] qemu-timer: gracefully handle the end of time
Date: Tue, 28 Jul 2020 17:08:26 +0100
User-agent: mu4e 1.5.5; emacs 28.0.50

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 via email to

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