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

[Xen-changelog] [xen-unstable] [IA64] let VMM do itc sync for guest on VTI domain



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID d33add81096b057f98fa740ab88d6c17426f8d68
# Parent  d0a77e90eaa308f49439eb14700e428e7cfc7d58
[IA64] let VMM do itc sync for guest on VTI domain

Previously, on SMP VTI-domain, Guest OS was responsible for
syncing itc by calling ia64_sync_itc, but the round trip may
be very large on VTI domain, that may cause guest itcs are
not synced well and cause guest wall clock is not accurate.

This patch intends to fix this issue, when guest wants to sync
itc( vcpus other than vcpu0 write itc), VMM directly get vcpu0
itc for other vcpus.

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
---
 xen/arch/ia64/vmx/vlsapic.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff -r d0a77e90eaa3 -r d33add81096b xen/arch/ia64/vmx/vlsapic.c
--- a/xen/arch/ia64/vmx/vlsapic.c       Wed Jun 14 16:05:44 2006 -0600
+++ b/xen/arch/ia64/vmx/vlsapic.c       Wed Jun 14 16:05:45 2006 -0600
@@ -140,8 +140,6 @@ uint64_t vtm_get_itc(VCPU *vcpu)
 }
 
 
-
-
 void vtm_set_itc(VCPU *vcpu, uint64_t new_itc)
 {
     uint64_t    vitm, vitv;
@@ -149,8 +147,15 @@ void vtm_set_itc(VCPU *vcpu, uint64_t ne
     vitm = VCPU(vcpu,itm);
     vitv = VCPU(vcpu,itv);
     vtm=&(vcpu->arch.arch_vmx.vtm);
-    vtm->vtm_offset = new_itc - ia64_get_itc();
-    vtm->last_itc = new_itc;
+    if(vcpu->vcpu_id == 0){
+        vtm->vtm_offset = new_itc - ia64_get_itc();
+        vtm->last_itc = new_itc;
+    }
+    else{
+        vtm->vtm_offset = vcpu->domain->vcpu[0]->arch.arch_vmx.vtm.vtm_offset;
+        new_itc=vtm->vtm_offset + ia64_get_itc();
+        vtm->last_itc = new_itc;
+    }
     if(vitm < new_itc){
         clear_bit(ITV_VECTOR(vitv), &VCPU(vcpu, irr[0]));
         stop_timer(&vtm->vtm_timer);

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