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] Initialise AP TSC to same as BP TSC

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] Initialise AP TSC to same as BP TSC.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 06 Nov 2006 16:50:38 +0000
Delivery-date: Mon, 06 Nov 2006 08:54:12 -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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID a910bf123e5875681d925ad9981129485b1c8eaa
# Parent  1db00df48218a4f58ca75910de9273fb4672af19
[HVM] Initialise AP TSC to same as BP TSC.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c      |    9 +++++++--
 xen/arch/x86/hvm/vmx/vmcs.c |   13 -------------
 2 files changed, 7 insertions(+), 15 deletions(-)

diff -r 1db00df48218 -r a910bf123e58 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Mon Nov 06 15:40:30 2006 +0000
+++ b/xen/arch/x86/hvm/hvm.c    Mon Nov 06 15:46:28 2006 +0000
@@ -69,9 +69,9 @@ void hvm_set_guest_time(struct vcpu *v, 
 void hvm_set_guest_time(struct vcpu *v, u64 gtime)
 {
     u64 host_tsc;
-   
+
     rdtscll(host_tsc);
-    
+
     v->arch.hvm_vcpu.cache_tsc_offset = gtime - host_tsc;
     hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
 }
@@ -540,6 +540,11 @@ int hvm_bringup_ap(int vcpuid, int tramp
     }
 
     hvm_init_ap_context(ctxt, vcpuid, trampoline_vector);
+
+    /* Sync AP's TSC with BSP's. */
+    v->arch.hvm_vcpu.cache_tsc_offset =
+        v->domain->vcpu[0]->arch.hvm_vcpu.cache_tsc_offset;
+    hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
 
     LOCK_BIGLOCK(d);
     rc = -EEXIST;
diff -r 1db00df48218 -r a910bf123e58 xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c       Mon Nov 06 15:40:30 2006 +0000
+++ b/xen/arch/x86/hvm/vmx/vmcs.c       Mon Nov 06 15:46:28 2006 +0000
@@ -285,19 +285,6 @@ static void vmx_set_host_env(struct vcpu
     error |= __vmwrite(HOST_RSP, (unsigned long)get_stack_bottom());
 }
 
-#if 0
-static void vmx_do_launch(struct vcpu *v)
-{
-    if ( v->vcpu_id != 0 )
-    {
-        /* Sync AP's TSC with BSP's */
-        v->arch.hvm_vcpu.cache_tsc_offset = 
-            v->domain->vcpu[0]->arch.hvm_vcpu.cache_tsc_offset;
-        hvm_funcs.set_tsc_offset(v, v->arch.hvm_vcpu.cache_tsc_offset);
-    }
-}
-#endif
-
 static int construct_vmcs(struct vcpu *v)
 {
     int error = 0;

_______________________________________________
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] Initialise AP TSC to same as BP TSC., Xen patchbot-unstable <=