diff options
author | emellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com> | 2006-03-23 14:45:21 +0100 |
---|---|---|
committer | emellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com> | 2006-03-23 14:45:21 +0100 |
commit | 40c418026358f63c2d4202337ba54386d84aac13 (patch) | |
tree | 8ba48c1ab1125b72769cf8280cf35f035e21f25a | |
parent | 785fc7779245198d29c8415270ad8884b08f7f7b (diff) | |
parent | 5b7966f9128b094b842141ff55f9551018de1fff (diff) | |
download | xen-40c418026358f63c2d4202337ba54386d84aac13.tar.gz xen-40c418026358f63c2d4202337ba54386d84aac13.tar.bz2 xen-40c418026358f63c2d4202337ba54386d84aac13.zip |
Merged.
-rw-r--r-- | xen/arch/x86/hvm/vmx/io.c | 9 | ||||
-rw-r--r-- | xen/arch/x86/hvm/vmx/vmx.c | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/xen/arch/x86/hvm/vmx/io.c b/xen/arch/x86/hvm/vmx/io.c index 1a862894ae..18c793f843 100644 --- a/xen/arch/x86/hvm/vmx/io.c +++ b/xen/arch/x86/hvm/vmx/io.c @@ -86,7 +86,7 @@ interrupt_post_injection(struct vcpu * v, int vector, int type) } 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 @@ void vmx_do_resume(struct vcpu *v) 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 --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 0235d066f9..fcca96efdb 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -358,9 +358,10 @@ static void vmx_freeze_time(struct vcpu *v) { 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) |