All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Dor Laor <dlaor@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Glauber Costa <glommer@redhat.com>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 0/5] Refactor and enhance RTC configuration
Date: Wed, 09 Sep 2009 21:13:49 +0200	[thread overview]
Message-ID: <4AA7FE6D.2030007@web.de> (raw)
In-Reply-To: <f43fc5580909091033g66e13435tfe78800797d87c1a@mail.gmail.com>

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

Blue Swirl wrote:
> On Wed, Sep 9, 2009 at 6:11 PM, Jan Kiszka<jan.kiszka@web.de> wrote:
>> The aim of this series is to allow using the emulated PC RTC (MC146818)
>> as a reliable time source for guests. This is particularly useful if the
>> host runs NTP or has otherwise access to an accurate clock while the
>> guest has not (no network, impossible to add an NTP implementation
>> etc.).
> 
> What I meant in the earlier thread is that m48t59 port read for time
> or date gets the data directly from host using  qemu_get_timedate().
> PC RTC instead uses a timer: the timer callback updates the cmos_data
> structure. It seems that you just replace the timer with a new one.
> I'd remove the timer altogether and change the cmos_ioport_read to
> call qemu_get_timedate().

That was my first idea as well, but the timer is there to emulate real
hardware behavior: Updates only take place while the UIP flag is set in
register A, and they take a few hundred microseconds. Guests actually
wait for this to happen and only read out after such a change. Moreover,
updates can trigger interrupts.

For sure one could avoid these update timers. But as they are so rare (1
HZ...), I didn't want to prematurely optimize the code here, risking
regressions while trying to fix our problems.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

      reply	other threads:[~2009-09-09 19:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 15:11 [Qemu-devel] [PATCH 0/5] Refactor and enhance RTC configuration Jan Kiszka
2009-09-09 15:11 ` [Qemu-devel] [PATCH 1/5] Rename QEMU_TIMER_* to QEMU_CLOCK_* Jan Kiszka
2009-09-09 15:11 ` [Qemu-devel] [PATCH 5/5] Enable host-clock-based RTC Jan Kiszka
2009-09-09 15:11 ` [Qemu-devel] [PATCH 2/5] win32: Drop dead dyntick timer code Jan Kiszka
2009-09-09 15:11 ` [Qemu-devel] [PATCH 4/5] Refactor RTC command line switches Jan Kiszka
2009-09-09 15:11 ` [Qemu-devel] [PATCH 3/5] Introduce QEMU_CLOCK_HOST Jan Kiszka
2009-09-09 15:40 ` [Qemu-devel] Re: [PATCH 0/5] Refactor and enhance RTC configuration Anthony Liguori
2009-09-09 16:24   ` Jan Kiszka
2009-09-09 16:41     ` Jan Kiszka
2009-09-09 18:03       ` Markus Armbruster
2009-09-09 17:59     ` Anthony Liguori
2009-09-09 20:00       ` Jan Kiszka
2009-09-09 20:18         ` Anthony Liguori
2009-09-09 22:23       ` Jamie Lokier
2009-09-11  8:54         ` Jan Kiszka
2009-09-13 15:08           ` Dor Laor
2009-09-13 15:37             ` Jan Kiszka
2009-09-14 13:36               ` Anthony Liguori
2009-09-14 15:40                 ` Jan Kiszka
2009-09-09 17:59     ` Markus Armbruster
2009-09-10 10:41   ` Gerd Hoffmann
2009-09-09 17:33 ` Blue Swirl
2009-09-09 19:13   ` Jan Kiszka [this message]

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=4AA7FE6D.2030007@web.de \
    --to=jan.kiszka@web.de \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=dlaor@redhat.com \
    --cc=glommer@redhat.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 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.