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

[Xen-changelog] [IA64] vcpu_match_tr_entry



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 434c8412e54ecc33124e71e4193de09df8a3c948
# Parent  0665256a7a5368f3e76366448696aeddb8643bb5
[IA64] vcpu_match_tr_entry

cpu_match_tr_entry moved from vcpu.h to vcpu.c, is now an inlined function
and its range check is fixed.

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>

diff -r 0665256a7a53 -r 434c8412e54e xen/arch/ia64/xen/vcpu.c
--- a/xen/arch/ia64/xen/vcpu.c  Thu Mar 30 12:47:45 2006 -0700
+++ b/xen/arch/ia64/xen/vcpu.c  Fri Mar 31 14:03:07 2006 -0700
@@ -1273,6 +1273,14 @@ unsigned long recover_to_break_fault_cou
 
 int warn_region0_address = 0; // FIXME later: tie to a boot parameter?
 
+// FIXME: also need to check && (!trp->key || vcpu_pkr_match(trp->key))
+static inline int vcpu_match_tr_entry(TR_ENTRY *trp, UINT64 ifa, UINT64 rid)
+{
+       return trp->p && trp->rid == rid 
+               && ifa >= trp->vadr
+               && ifa <= (trp->vadr + (1L << trp->ps) - 1);
+}
+
 IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, BOOLEAN 
in_tpa, UINT64 *pteval, UINT64 *itir, UINT64 *iha)
 {
        unsigned long region = address >> 61;
diff -r 0665256a7a53 -r 434c8412e54e xen/include/asm-ia64/vcpu.h
--- a/xen/include/asm-ia64/vcpu.h       Thu Mar 30 12:47:45 2006 -0700
+++ b/xen/include/asm-ia64/vcpu.h       Fri Mar 31 14:03:07 2006 -0700
@@ -16,6 +16,7 @@ typedef cpu_user_regs_t REGS;
 typedef cpu_user_regs_t REGS;
 
 
+/* Note: PSCB stands for Privilegied State Communication Block.  */
 #define VCPU(_v,_x)    (_v->arch.privregs->_x)
 #define PSCB(_v,_x) VCPU(_v,_x)
 #define PSCBX(_v,_x) (_v->arch._x)
@@ -185,10 +186,5 @@ itir_mask(UINT64 itir)
 #define vcpu_quick_region_set(_tr_regions,_ifa)             \
     do {_tr_regions |= (1 << ((unsigned long)_ifa >> 61)); } while (0)
 
-// FIXME: also need to check && (!trp->key || vcpu_pkr_match(trp->key))
-#define vcpu_match_tr_entry(_trp,_ifa,_rid)             \
-    ((_trp->p && (_trp->rid==_rid) && (_ifa >= _trp->vadr) &&   \
-    (_ifa < (_trp->vadr + (1L<< _trp->ps)) - 1)))
-
 
 #endif

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