|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] [HVM][PIT] Fix missed_ticks() logic.
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID cca6641d40875d955654fc75506b49fe85e7f03f
# Parent 28128dafbe03758434bc947002758edf60a2747e
[HVM][PIT] Fix missed_ticks() logic.
Signed-off-by Xiaowei Yang <xiaowei.yang@xxxxxxxxx>
---
xen/arch/x86/hvm/intercept.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff -r 28128dafbe03 -r cca6641d4087 xen/arch/x86/hvm/intercept.c
--- a/xen/arch/x86/hvm/intercept.c Wed Jun 07 13:38:08 2006 +0100
+++ b/xen/arch/x86/hvm/intercept.c Wed Jun 07 13:42:21 2006 +0100
@@ -216,13 +216,14 @@ void hlt_timer_fn(void *data)
static __inline__ void missed_ticks(struct periodic_time *pt)
{
- int missed_ticks;
-
- missed_ticks = (NOW() - pt->scheduled)/(s_time_t) pt->period;
- if ( missed_ticks++ >= 0 ) {
+ s_time_t missed_ticks;
+
+ missed_ticks = NOW() - pt->scheduled;
+ if ( missed_ticks > 0 ) {
+ missed_ticks = missed_ticks / (s_time_t) pt->period + 1;
if ( missed_ticks > 1000 ) {
/* TODO: Adjust guest time togther */
- pt->pending_intr_nr ++;
+ pt->pending_intr_nr++;
}
else {
pt->pending_intr_nr += missed_ticks;
@@ -236,6 +237,9 @@ void pt_timer_fn(void *data)
{
struct vcpu *v = data;
struct periodic_time *pt =
&(v->domain->arch.hvm_domain.pl_time.periodic_tm);
+
+ pt->pending_intr_nr++;
+ pt->scheduled += pt->period;
/* pick up missed timer tick */
missed_ticks(pt);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] [HVM][PIT] Fix missed_ticks() logic.,
Xen patchbot-unstable <=
|
|
|
|
|