From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Bei Guan <gbtju85@gmail.com>, Xen Devel <xen-devel@lists.xensource.com>
Cc: "Andrei E. Warkentin" <andrey.warkentin@gmail.com>
Subject: Re: Questions on the PIT and APIC timer in Xen
Date: Wed, 28 Mar 2012 08:46:01 -0700 (PDT) [thread overview]
Message-ID: <09b9e0f3-8548-447f-ba52-33992932f321@default> (raw)
In-Reply-To: <CAEQjb-Rtc-fcL6UUKZmmewv8SL-sK1=yQ54_P=QmdiHESof4sQ@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1977 bytes --]
Both the PIT and APIC (as well as HPET) timers are emulated by Xen for an HVM guest. However there have always been rare hard-to-reproduce problems when guests use them. At one time, there were workarounds that required a special parameter "timer_mode" to be selected for HVM guests. If I recall correctly, different timer modes overcame different limitations of different timer emulations (or maybe mismatches between guest "bugs" exposed by virtual time and true hypervisor emulation). These timer_mode workarounds may or may not work with more recent Linux and Windows guests. And there are still periodic bug fixes being applied for timers in the hypervisor emulation code.
At 4.0, full TSC emulation was added in an attempt to provide a high-resolution guaranteed monotonic timer. However, most legacy HVM guests cannot or refuse to use TSC as a timer. (And there may be lurking bugs there as well.)
For most PV guest OS's, the pvclock algorithm is used so PIT/APIC/HPET emulation should be unnecessary (and, if used, is likely buggy). And actually pvclock should be superceded by using TSC, which is always faster, but for most workloads the performance difference doesn't matter.
If you are interested in a good (but difficult) Xen project, "virtual time" still needs work and documentation. I would be happy to provide lots of background documentation but can't volunteer to help much more than that right now.
Hope that helps,
Dan
From: Bei Guan [mailto:gbtju85@gmail.com]
Sent: Wednesday, March 28, 2012 1:32 AM
To: Xen Devel
Cc: Andrei E. Warkentin
Subject: [Xen-devel] Questions on the PIT and APIC timer in Xen
Hi,
I wonder whether the PIT/APIC timer for HVM Guest OS is emulated by Xen or not.
What's difference between setting the boot PIT/APIC timer for a PV Guest OS and HVM Guest OS?
I would appreciate any reply for my question.
--
Best Regards,
Bei Guan
[-- Attachment #1.2: Type: text/html, Size: 5739 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-03-28 15:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-28 7:31 Questions on the PIT and APIC timer in Xen Bei Guan
2012-03-28 13:00 ` Jan Beulich
2012-03-28 13:50 ` Bei Guan
2012-03-28 13:58 ` Jan Beulich
2012-03-28 14:31 ` Bei Guan
2012-03-28 15:46 ` Dan Magenheimer [this message]
2012-03-29 1:45 ` Bei Guan
2012-03-29 15:08 ` Dan Magenheimer
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=09b9e0f3-8548-447f-ba52-33992932f321@default \
--to=dan.magenheimer@oracle.com \
--cc=andrey.warkentin@gmail.com \
--cc=gbtju85@gmail.com \
--cc=xen-devel@lists.xensource.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).