qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Kostiuk <kkostiuk@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Cc: Vadim Rozenfeld <vrozenfe@redhat.com>, QEMU <qemu-devel@nongnu.org>
Subject: Re: Crash in RTC
Date: Thu, 27 Oct 2022 10:49:43 +0300	[thread overview]
Message-ID: <CAPMcbCqz2ev+VMDPQdKCBGSE7HmCF7hmJ-8J1sU=246zxMFcNw@mail.gmail.com> (raw)
In-Reply-To: <CAKiOO4unENQQHp7w7MUUdTStyBS7ZFi8wFKWtpe10_GGqg1URQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2591 bytes --]

ping

On Wed, Aug 31, 2022 at 11:33 AM Vadim Rozenfeld <vrozenfe@redhat.com>
wrote:

> Just a bit more info related to this issue.
> Below is a quote from my previous conversation with Yan
>
> </QUOTE>
> QEMU RTC function periodic_timer_update is calling in response
> to Windows HAL calls
> _HalpRtcArmTimer@16
> and
> _HalpRtcStop@4
>
> WIndows can change timer  frequency  dynamically
> (some more info can be found here
> https://bugzilla.redhat.com/show_bug.cgi?id=1610461 )
> but calculation of the frequency is based on the wallclock time (IIRC).
> And if I'm not mistaken, then lost_tick_policy=delay can lead to the
> wallclock time delay,
> which in my understanding can lead to the incorrect frequency calculation.
>
> Another interesting thing is that they don't use Hyper-V enlightenments at
> all.
> Do you know if there is any particular reason for that?  They might try
> switching
> to hv_stimer instead of RTC.
>
> And one more thing, the frequency of the timer can be adjusted by UM
> applications.
> Some of them , like emulators and servers use it quite widely. It worse
> asking them
> if they are running such kinds of apps.
> </QUOTE>
>
>
> Cheers,
> Vadim.
>
> On Wed, Aug 31, 2022 at 5:46 PM Konstantin Kostiuk <kkostiuk@redhat.com>
> wrote:
>
>> CC: Vadim
>>
>> On Wed, Aug 31, 2022 at 10:42 AM Konstantin Kostiuk <kkostiuk@redhat.com>
>> wrote:
>>
>>> ping
>>>
>>> On Wed, Aug 24, 2022 at 5:37 PM Konstantin Kostiuk <kkostiuk@redhat.com>
>>> wrote:
>>>
>>>> Hi Michael and Paolo,
>>>>
>>>> I write to you as maintainers of mc146818rtc.c. I am working on bug
>>>> https://bugzilla.redhat.com/show_bug.cgi?id=2054781
>>>> and reproduced it on the current master branch.
>>>>
>>>> I added some print at line 202 (before assert(lost_clock >= 0),
>>>> https://gitlab.com/qemu-project/qemu/-/blob/master/hw/rtc/mc146818rtc.c#L202)
>>>> and got the following values:
>>>>
>>>> next_periodic_clock, old_period, last_periodic_clock, cur_clock,
>>>> lost_clock, current_time
>>>> 54439076429968, 32, 54439076429936, 54439076430178, 242,
>>>> 1661348768010822000
>>>> 54439076430224, 512, 54439076429712, 54439076430188, 476,
>>>> 1661348768011117000
>>>> 54439076430224, 32, 54439076430192, 54439076429884, -308,
>>>> 1661348768001838000
>>>>
>>>> The current_time value in the last print is lower than in the previous
>>>> one.
>>>> So, the error occurs because time has gone backward.
>>>>
>>>> I think this is a possible situation during time synchronization.
>>>> My question is what should we do in this case?
>>>>
>>>> Best Regards,
>>>> Konstantin Kostiuk.
>>>>
>>>

[-- Attachment #2: Type: text/html, Size: 4328 bytes --]

       reply	other threads:[~2022-10-27  7:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPMcbCp+wRecC+WPTDJyyLLWbybnAO-W40i8rRZFDGqRtBvfdg@mail.gmail.com>
     [not found] ` <CAPMcbCrySmarW0GPzvSx6ZwknPK5gKJmADM9G6xTJvBHDT4o3Q@mail.gmail.com>
     [not found]   ` <CAPMcbCrtGETc-nKmWHHhJGx0hiAO3Yj0Lzo9sVa_W3E8eA45Rg@mail.gmail.com>
     [not found]     ` <CAKiOO4unENQQHp7w7MUUdTStyBS7ZFi8wFKWtpe10_GGqg1URQ@mail.gmail.com>
2022-10-27  7:49       ` Konstantin Kostiuk [this message]
2023-01-30  8:31 ` Crash in RTC Konstantin Kostiuk

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='CAPMcbCqz2ev+VMDPQdKCBGSE7HmCF7hmJ-8J1sU=246zxMFcNw@mail.gmail.com' \
    --to=kkostiuk@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vrozenfe@redhat.com \
    /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).