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] Pvrdtscp: move write_rdtscp_aux() to para

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Pvrdtscp: move write_rdtscp_aux() to paravirt_ctxt_switch_to() -
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 14 Dec 2009 01:45:10 -0800
Delivery-date: Mon, 14 Dec 2009 01:45:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1260776704 0
# Node ID 2d072636c4f8b80ac62f49aaeabb04fcdf74760c
# Parent  b928797213ac6066e8e2a11326857ba718b18a59
Pvrdtscp: move write_rdtscp_aux() to paravirt_ctxt_switch_to() -
Currently write_rdtscp_aux() is placed in update_vcpu_system_time(),
which is called by schedule() before context_switch(). This will break
the HVM guest TSC_AUX state because at this point, MSR hasn't beed
saved for HVM guests.So put the function in the point when a PV vcpu
is really scheduled in.

Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
---
 xen/arch/x86/domain.c |    4 ++++
 xen/arch/x86/time.c   |    4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff -r b928797213ac -r 2d072636c4f8 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Fri Dec 11 09:17:09 2009 +0000
+++ b/xen/arch/x86/domain.c     Mon Dec 14 07:45:04 2009 +0000
@@ -1298,6 +1298,10 @@ static void paravirt_ctxt_switch_to(stru
         write_debugreg(6, v->arch.guest_context.debugreg[6]);
         write_debugreg(7, v->arch.guest_context.debugreg[7]);
     }
+
+    if ( (v->domain->arch.tsc_mode ==  TSC_MODE_PVRDTSCP) &&
+         boot_cpu_has(X86_FEATURE_RDTSCP) )
+        write_rdtscp_aux(v->domain->arch.incarnation);
 }
 
 /* Update per-VCPU guest runstate shared memory area (if registered). */
diff -r b928797213ac -r 2d072636c4f8 xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Fri Dec 11 09:17:09 2009 +0000
+++ b/xen/arch/x86/time.c       Mon Dec 14 07:45:04 2009 +0000
@@ -831,10 +831,6 @@ static void __update_vcpu_system_time(st
                                 &d->arch.ns_to_vtsc);
     else
         tsc_stamp = t->local_tsc_stamp;
-
-    if ( (d->arch.tsc_mode ==  TSC_MODE_PVRDTSCP) &&
-         boot_cpu_has(X86_FEATURE_RDTSCP) )
-        write_rdtscp_aux(d->arch.incarnation);
 
     /* Don't bother unless timestamps have changed or we are forced. */
     if ( !force && (u->tsc_timestamp == tsc_stamp) )

_______________________________________________
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] Pvrdtscp: move write_rdtscp_aux() to paravirt_ctxt_switch_to() -, Xen patchbot-unstable <=