virtual time bugfix
PATCH 1/1 virtual time bugfix
Keir,
This patch fixes 2 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 <[email protected]>
Xiaowei
xen/arch/x86/hvm/vmx/io.c +6 -3
@@ -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); }
xen/arch/x86/hvm/vmx/vmx.c +3 -2
@@ -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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel