qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Change RTC time drift IRQ re-injection
Date: Sat, 18 Apr 2009 09:55:14 -0500	[thread overview]
Message-ID: <49E9E9D2.509@us.ibm.com> (raw)
In-Reply-To: <20090406132526.GA9153@redhat.com>

Gleb Natapov wrote:
> Currently IRQ are reinjected as soon as they are acknowledged to
> the RTC, but Windows sometimes do acknowledgement in a loop with
> global interrupt disabled waiting for interrupt to be cleared and
> it does not mask RTC vector in PIC/APIC while doing this. In such
> situation interrupt injection always fails and RTC interrupt is never
> cleared.
>
> Instead of reinjecting coalesced IRQs on acknowledgement the patch below
> reinjects them by accelerating RTC clock a bit. This way RTC interrupt
> is not constantly raced after coalesced interrupt.
>
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
>              s->cmos_data[RTC_REG_C] = 0x00;
>              break;
>          default:
> @@ -512,6 +539,7 @@ static void rtc_save_td(QEMUFile *f, void *opaque)
>  
>      qemu_put_be32(f, s->irq_coalesced);
>      qemu_put_be32(f, s->period);
> +    qemu_put_timer(f, s->coalesced_timer);
>  }
>  
>  static int rtc_load_td(QEMUFile *f, void *opaque, int version_id)
> @@ -523,6 +551,7 @@ static int rtc_load_td(QEMUFile *f, void *opaque, int version_id)
>  
>      s->irq_coalesced = qemu_get_be32(f);
>      s->period = qemu_get_be32(f);
> +    qemu_get_timer(f, s->coalesced_timer);
>      return 0;
>   

If you're adding something to the savevm format, you have to increment 
the version_id and handle older versions correctly.


-- 
Regards,

Anthony Liguori

  reply	other threads:[~2009-04-18 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 13:25 [Qemu-devel] [PATCH] Change RTC time drift IRQ re-injection Gleb Natapov
2009-04-18 14:55 ` Anthony Liguori [this message]
2009-04-19 14:06   ` Dor Laor
2009-04-21  8:18     ` Gleb Natapov

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=49E9E9D2.509@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --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 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).