[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix 2 VMX time-related bugs:



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID bb8a5d7e72a252d097de677fa595ff7189a9632f
# Parent  f3943890794ac66b72bbf1ca634120d23999a376
Fix 2 VMX time-related bugs:
 1) bogomips=0 or a very huge number after booting ia32/ia32e vmx
 2) Repeated keys show in Xwindow terminal after one key is pressed

Signed-off-by: Xiaowei Yang <xiaowei.yang@xxxxxxxxx>

diff -r f3943890794a -r bb8a5d7e72a2 xen/arch/x86/hvm/vmx/io.c
--- a/xen/arch/x86/hvm/vmx/io.c Thu Mar 23 13:34:35 2006
+++ b/xen/arch/x86/hvm/vmx/io.c Thu Mar 23 13:44:51 2006
@@ -86,7 +86,7 @@
         }
         vpit->inject_point = NOW();
 
-        vpit->last_pit_gtime += vpit->period;
+        vpit->last_pit_gtime += vpit->period_cycles;
         set_guest_time(v, vpit->last_pit_gtime);
     }
 
@@ -206,8 +206,11 @@
     vmx_stts();
 
     /* pick up the elapsed PIT ticks and re-enable pit_timer */
-    if ( vpit->first_injected) {
-        set_guest_time(v, v->domain->arch.hvm_domain.guest_time);
+    if ( vpit->first_injected ) {
+        if ( v->domain->arch.hvm_domain.guest_time ) {
+            set_guest_time(v, v->domain->arch.hvm_domain.guest_time);
+            v->domain->arch.hvm_domain.guest_time = 0;
+        }
         pickup_deactive_ticks(vpit);
     }
 
diff -r f3943890794a -r bb8a5d7e72a2 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Thu Mar 23 13:34:35 2006
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Thu Mar 23 13:44:51 2006
@@ -358,9 +358,10 @@
 {
     struct hvm_virpit *vpit = &v->domain->arch.hvm_domain.vpit;
     
-    v->domain->arch.hvm_domain.guest_time = get_guest_time(v);
-    if ( vpit->first_injected )
+    if ( vpit->first_injected && !v->domain->arch.hvm_domain.guest_time ) {
+        v->domain->arch.hvm_domain.guest_time = get_guest_time(v);
         stop_timer(&(vpit->pit_timer));
+    }
 }
 
 static void vmx_ctxt_switch_from(struct vcpu *v)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.