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

[Xen-changelog] [xen-unstable] [IA64] tak emulation, minor 4k-page correction



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1189545159 21600
# Node ID 923795831f9abc759e5254672586c03094920987
# Parent  42caadb14edb069e8d488c7b84786c110d05bb40
[IA64] tak emulation, minor 4k-page correction

Signed-off-by: Juergen Gross juergen.gross@xxxxxxxxxxxxxxxxxxx
---
 xen/arch/ia64/xen/mm.c   |    2 +-
 xen/arch/ia64/xen/vcpu.c |   14 ++++++++++----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff -r 42caadb14edb -r 923795831f9a xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Tue Sep 11 15:09:33 2007 -0600
+++ b/xen/arch/ia64/xen/mm.c    Tue Sep 11 15:12:39 2007 -0600
@@ -527,7 +527,7 @@ u64 translate_domain_pte(u64 pteval, u64
 
        pteval2 = lookup_domain_mpa(d, mpaddr, entry);
        if (ps < PAGE_SHIFT)
-               pteval2 |= address & (PAGE_SIZE - 1) & ~((1L << ps) - 1);
+               pteval2 |= mpaddr & (PAGE_SIZE - 1) & ~((1L << ps) - 1);
 
        /* Check access rights.  */
        arflags  = pteval  & _PAGE_AR_MASK;
diff -r 42caadb14edb -r 923795831f9a xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Tue Sep 11 15:09:33 2007 -0600
+++ b/xen/arch/ia64/xen/vcpu.c  Tue Sep 11 15:12:39 2007 -0600
@@ -1817,10 +1817,16 @@ IA64FAULT vcpu_tpa(VCPU * vcpu, u64 vadr
 
 IA64FAULT vcpu_tak(VCPU * vcpu, u64 vadr, u64 * key)
 {
-       printk("vcpu_tak: tak instruction unsupported\n");
-       return IA64_ILLOP_FAULT;
-       // HACK ALERT: tak does a thash for now
-       //return vcpu_thash(vcpu,vadr,key);
+       u64 pteval, itir, mask, iha;
+       IA64FAULT fault;
+
+       fault = vcpu_translate(vcpu, vadr, TRUE, &pteval, &itir, &iha);
+       if (fault == IA64_NO_FAULT || fault == IA64_USE_TLB)
+               *key = itir & IA64_ITIR_KEY_MASK;
+       else
+               *key = 1;
+
+       return IA64_NO_FAULT;
 }
 
 /**************************************************************************

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