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

[Xen-changelog] [xen stable-4.3] x86/hvm: reset TSC to 0 after domain resume from S3



commit fb951fd3ba847b2c6acf6f3728a654981950388c
Author:     Tomasz Wroblewski <tomasz.wroblewski@xxxxxxxxxx>
AuthorDate: Wed Nov 27 10:01:33 2013 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Nov 27 10:01:33 2013 +0100

    x86/hvm: reset TSC to 0 after domain resume from S3
    
    Host S3 implicitly resets the host TSC to 0, but the tsc offset for hvm
    domains is not recalculated when they resume, causing it to go into
    negative values. In Linux guest using tsc clocksource, this results in
    a hang after wrap back to positive values since the tsc clocksource
    implementation expects it reset.
    
    Signed-off-by: Tomasz Wroblewski <tomasz.wroblewski@xxxxxxxxxx>
    master commit: e95dc6ba69daef6468b3ae5912710727244d6e2f
    master date: 2013-11-22 14:47:24 +0100
---
 xen/arch/x86/hvm/hvm.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 6dd4067..e54045f 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3607,7 +3607,13 @@ static void hvm_s3_suspend(struct domain *d)
 static void hvm_s3_resume(struct domain *d)
 {
     if ( test_and_clear_bool(d->arch.hvm_domain.is_s3_suspended) )
+    {
+        struct vcpu *v;
+
+        for_each_vcpu( d, v )
+            hvm_set_guest_tsc(v, 0);
         domain_unpause(d);
+    }
 }
 
 static int hvmop_set_isa_irq_level(
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.