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] [IA64] vti bugs fix

# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 50837fb048075ef0682456aa89e9afd1bec0b39e
# Parent  9105cc8a738cddb374ebd57f07c1aecb165ab7a5
[IA64] vti bugs fix

Bug fixes:
 - Do not read long-format vhpt as short-format.
 - Avoid infinite loop in vtlb_purge.

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
 xen/arch/ia64/vmx/vtlb.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff -r 9105cc8a738c -r 50837fb04807 xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Mon Aug 14 11:35:33 2006 -0600
+++ b/xen/arch/ia64/vmx/vtlb.c  Mon Aug 14 11:46:40 2006 -0600
@@ -214,12 +214,22 @@ u64 guest_vhpt_lookup(u64 iha, u64 *pte)
 {
     u64 ret;
     thash_data_t * data;
+    PTA vpta;
+
     data = vhpt_lookup(iha);
     if (data == NULL) {
         data = vtlb_lookup(current, iha, DSIDE_TLB);
         if (data != NULL)
             thash_vhpt_insert(current, data->page_flags, data->itir ,iha);
     }
+
+    /* VHPT long format is not read.  */
+    vmx_vcpu_get_pta(current, &vpta.val);
+    if (vpta.vf == 1) {
+        *pte = 0;
+        return 0;
+    }
+
     asm volatile ("rsm psr.ic|psr.i;;"
                   "srlz.d;;"
                   "ld8.s r9=[%1];;"
@@ -231,7 +241,7 @@ u64 guest_vhpt_lookup(u64 iha, u64 *pte)
                   "ssm psr.ic;;"
                   "srlz.d;;"
                   "ssm psr.i;;"
-             : "=r"(ret) : "r"(iha), "r"(pte):"memory");
+                  : "=r"(ret) : "r"(iha), "r"(pte):"memory");
     return ret;
 }
 
@@ -257,7 +267,8 @@ void vtlb_purge(VCPU *v, u64 va, u64 ps)
         psbits &= ~(1UL << ps);
         def_size = PSIZE(ps);
         vrr.ps = ps;
-        while (curadr < end) {
+        /* Be careful about overflow.  */
+        while (curadr < end && curadr >= start) {
             cur = vsa_thash(hcb->pta, curadr, vrr.rrval, &tag);
             while (cur) {
                 if (cur->etag == tag && cur->ps == ps)

_______________________________________________
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] [IA64] vti bugs fix, Xen patchbot-unstable <=