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

[Xen-changelog] [xen-unstable] [IA64] Fix for ptc.ga emulation



# HG changeset patch
# User awilliam@lappy
# Node ID c78f750a264ce0947fb3acb7dfbb528628a2b51d
# Parent  c5005be9ef91849da1d2fc732ff6ebc710af9803
[IA64] Fix for ptc.ga emulation

If switch to idle domain after vhpt_purge in ptc_ga emulation,
shouldn't switch rr7 and pta. Only disable VHPT needed. If no,
Smp VTi will hang whole system due to fault.

Signed-off-by: Zhang xiantao <xiantao.zhang@xxxxxxxxx>
Signed-off-by: Kevin Tian <kevin.tian@xxxxxxxxx>
---
 xen/arch/ia64/xen/regionreg.c |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff -r c5005be9ef91 -r c78f750a264c xen/arch/ia64/xen/regionreg.c
--- a/xen/arch/ia64/xen/regionreg.c     Tue Jun 20 15:56:48 2006 -0600
+++ b/xen/arch/ia64/xen/regionreg.c     Tue Jun 20 16:05:17 2006 -0600
@@ -345,13 +345,19 @@ void load_region_regs(struct vcpu *v)
 
 void load_region_reg7_and_pta(struct vcpu *v)
 {
-       unsigned long rr7;
-
-       ia64_set_pta(VHPT_ADDR | (1 << 8) | (VHPT_SIZE_LOG2 << 2) |
-                    VHPT_ENABLED);
-
-       // TODO: These probably should be validated
-       rr7 =  VCPU(v,rrs[7]);
-       if (!set_one_rr(0xe000000000000000L, rr7))
-               panic_domain(0, "%s: can't set!\n", __func__);
-}
+       unsigned long rr7, pta;
+
+       if (!is_idle_domain(v->domain)) {  
+               ia64_set_pta(VHPT_ADDR | (1 << 8) | (VHPT_SIZE_LOG2 << 2) |
+                            VHPT_ENABLED);
+
+               // TODO: These probably should be validated
+               rr7 =  VCPU(v,rrs[7]);
+               if (!set_one_rr(0xe000000000000000L, rr7))
+                       panic_domain(0, "%s: can't set!\n", __func__);
+       }
+       else {
+               pta = ia64_get_pta();
+               ia64_set_pta(pta & ~VHPT_ENABLED);
+       }
+}

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