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

[Xen-changelog] [xen-unstable] [IA64] ptc.g virtualization fix



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 3dca270188da9065b10c60e5d5459239badf161b
# Parent  d4e799a1fa9c549b31820431df357a00095ef18f
[IA64] ptc.g virtualization fix

VMM only needs to switch rr0 and pta when emulating ptc.g.
Because VMM only use rr0 and pta to do global purge on other LPs.
VMM doesn't need to switch rr7, it is time consuming operation.

Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
---
 xen/arch/ia64/vmx/vmmu.c |    5 ++++-
 xen/arch/ia64/vmx/vtlb.c |   12 ------------
 2 files changed, 4 insertions(+), 13 deletions(-)

diff -r d4e799a1fa9c -r 3dca270188da xen/arch/ia64/vmx/vmmu.c
--- a/xen/arch/ia64/vmx/vmmu.c  Fri Jun 23 16:10:32 2006 -0600
+++ b/xen/arch/ia64/vmx/vmmu.c  Mon Jun 26 14:33:01 2006 -0600
@@ -517,7 +517,7 @@ struct ptc_ga_args {
 
 static void ptc_ga_remote_func (void *varg)
 {
-    u64 oldrid, moldrid;
+    u64 oldrid, moldrid, mpta;
     struct ptc_ga_args *args = (struct ptc_ga_args *)varg;
     VCPU *v = args->vcpu;
 
@@ -525,10 +525,13 @@ static void ptc_ga_remote_func (void *va
     VMX(v, vrr[0]) = args->rid;
     moldrid = ia64_get_rr(0x0);
     ia64_set_rr(0x0,vrrtomrr(v,args->rid));
+    mpta = ia64_get_pta();
+    ia64_set_pta(v->arch.arch_vmx.mpta);
     ia64_srlz_d();
     vmx_vcpu_ptc_l(v, args->vadr, args->ps);
     VMX(v, vrr[0]) = oldrid; 
     ia64_set_rr(0x0,moldrid);
+    ia64_set_pta(mpta);
     ia64_dv_serialize_data();
 }
 
diff -r d4e799a1fa9c -r 3dca270188da xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Fri Jun 23 16:10:32 2006 -0600
+++ b/xen/arch/ia64/vmx/vtlb.c  Mon Jun 26 14:33:01 2006 -0600
@@ -267,14 +267,6 @@ static void vtlb_purge(VCPU *v, u64 va, 
 //    machine_tlb_purge(va, ps);
 }
 
-static void
-switch_rr7_and_pta(VCPU* v)
-{
-    if (VMX_DOMAIN(v))
-        vmx_load_rr7_and_pta(v);
-    else
-        load_region_reg7_and_pta(v);
-}
 
 /*
  *  purge VHPT and machine TLB
@@ -287,8 +279,6 @@ static void vhpt_purge(VCPU *v, u64 va, 
     size = PSIZE(ps);
     start = va & (-size);
     end = start + size;
-    if (current != v)
-        switch_rr7_and_pta(v);
     while(start < end){
         hash_table = (thash_data_t *)ia64_thash(start);
         tag = ia64_ttag(start);
@@ -310,8 +300,6 @@ static void vhpt_purge(VCPU *v, u64 va, 
         start += PAGE_SIZE;
     }
     machine_tlb_purge(va, ps);
-    if (current != v)
-        switch_rr7_and_pta(current);
 }
 
 /*

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