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

[Xen-changelog] [xen-unstable] [HVM] When guest explicitly modifies the TSC, update platform timers



# HG changeset patch
# User shand@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Date 1170118371 0
# Node ID 6e3decbd3e566a4a09b178405b5799ae278268e0
# Parent  5e3b47bcc311e7698959f1fa79c4654190593499
[HVM] When guest explicitly modifies the TSC, update platform timers 
_after_ updating guest time (since otherwise pt_reset() will get the 
old hvm_get_guest_time() and subsequently pt_intr_post() will warp 
the TSC back again). 

This is the smallest fix for the HVM SMP TSC issues seen on recent 
(viz. 2.6.18+) linux HVM kernels, but probably not the best. Cleaner
fix needs more thought. 

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/svm.c |    2 +-
 xen/arch/x86/hvm/vmx/vmx.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -r 5e3b47bcc311 -r 6e3decbd3e56 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Mon Jan 29 22:43:51 2007 +0000
+++ b/xen/arch/x86/hvm/svm/svm.c        Tue Jan 30 00:52:51 2007 +0000
@@ -2141,8 +2141,8 @@ static inline void svm_do_msr_access(
         switch (ecx)
         {
         case MSR_IA32_TIME_STAMP_COUNTER:
+            hvm_set_guest_time(v, msr_content);
             pt_reset(v);
-            hvm_set_guest_time(v, msr_content);
             break;
         case MSR_IA32_SYSENTER_CS:
             vmcb->sysenter_cs = msr_content;
diff -r 5e3b47bcc311 -r 6e3decbd3e56 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Mon Jan 29 22:43:51 2007 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Tue Jan 30 00:52:51 2007 +0000
@@ -2346,8 +2346,8 @@ static inline int vmx_do_msr_write(struc
 
     switch (ecx) {
     case MSR_IA32_TIME_STAMP_COUNTER:
+        hvm_set_guest_time(v, msr_content);
         pt_reset(v);
-        hvm_set_guest_time(v, msr_content);
         break;
     case MSR_IA32_SYSENTER_CS:
         __vmwrite(GUEST_SYSENTER_CS, msr_content);

_______________________________________________
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®.