All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Frederic Konrad <fred.konrad@greensocs.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, mark.burton@greensocs.com
Subject: Re: [Qemu-devel] [RFC] icount: warp in the main_loop.
Date: Fri, 04 Jul 2014 09:57:42 +0200	[thread overview]
Message-ID: <53B65E76.4040900@redhat.com> (raw)
In-Reply-To: <53B65823.3050006@greensocs.com>

Il 04/07/2014 09:30, Frederic Konrad ha scritto:
>>   +    /*
>> +     * In icount mode, sometimes the VCPU is blocked and an event is
>> needed to
>> +     * continue.
>> +     * Just warp to make the time grows and have a chance to run the
>> CPU.
>> +     */
>> +    qemu_clock_warp(QEMU_CLOCK_VIRTUAL);
>>       return ret;
>>   }
>>
> Paolo,
> You mentioned some icount patches (I can't find where) can you point me
> to them?
> Did you already had this bug?

Why is this needed?  It's possible that a qemu_clock_warp code is 
missing somewhere, but for timers it should be handled here:

static void timerlist_rearm(QEMUTimerList *timer_list)
{
     /* Interrupt execution to force deadline recalculation.  */
     qemu_clock_warp(timer_list->clock->type);
     timerlist_notify(timer_list);
}

If the VCPU is blocked, it will set vm_clock_warp_start to the realtime 
clock value ("clock") a QEMU_CLOCK_REALTIME timer to the next deadline 
("clock + deadline").  At the next deadline, icount_warp_rt will 
increase QEMU_CLOCK_VIRTUAL by "clock - vm_clock_warp_state" which 
should trigger the clock event.

Paolo

  reply	other threads:[~2014-07-04  7:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 16:13 [Qemu-devel] [RFC] icount: warp in the main_loop fred.konrad
2014-07-04  7:30 ` Frederic Konrad
2014-07-04  7:57   ` Paolo Bonzini [this message]
2014-07-04 10:28     ` Frederic Konrad
2014-07-04 10:36       ` Paolo Bonzini

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=53B65E76.4040900@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=fred.konrad@greensocs.com \
    --cc=mark.burton@greensocs.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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.