WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [HVM] When guest explicitly modifies the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] When guest explicitly modifies the TSC, update platform timers
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Jan 2007 06:00:30 -0800
Delivery-date: Tue, 30 Jan 2007 06:02:13 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [HVM] When guest explicitly modifies the TSC, update platform timers, Xen patchbot-unstable <=