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

[Xen-changelog] [xen-unstable] [IA64] Declarations for PKR



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1185833231 21600
# Node ID 522a1932111f225bf4ab05d9260fc1f49160b0de
# Parent  32825349924d2e39d081cf192eee82fb5c46c878
[IA64] Declarations for PKR

Added new declarations for protection keys and define
XEN_IA64_NPKRS representing number of PKRs for PV domains.

Signed-off-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/fw_emul.c         |    2 +-
 xen/include/asm-ia64/xenkregs.h     |   24 ++++++++++++++++++++----
 xen/include/asm-ia64/xenprocessor.h |   13 +++++++++++++
 3 files changed, 34 insertions(+), 5 deletions(-)

diff -r 32825349924d -r 522a1932111f xen/arch/ia64/xen/fw_emul.c
--- a/xen/arch/ia64/xen/fw_emul.c       Mon Jul 30 16:01:05 2007 -0600
+++ b/xen/arch/ia64/xen/fw_emul.c       Mon Jul 30 16:07:11 2007 -0600
@@ -669,7 +669,7 @@ xen_pal_emulator(unsigned long index, u6
                                 { .vw = 1,
                                   .phys_add_size = 44,
                                   .key_size = 16,
-                                  .max_pkr = 15,
+                                  .max_pkr = XEN_IA64_NPKRS,
                                   .hash_tag_id = 0x30,
                                   .max_dtr_entry = NDTRS - 1,
                                   .max_itr_entry = NITRS - 1,
diff -r 32825349924d -r 522a1932111f xen/include/asm-ia64/xenkregs.h
--- a/xen/include/asm-ia64/xenkregs.h   Mon Jul 30 16:01:05 2007 -0600
+++ b/xen/include/asm-ia64/xenkregs.h   Mon Jul 30 16:07:11 2007 -0600
@@ -38,13 +38,29 @@
 /* Some cr.itir declarations. */
 #define        IA64_ITIR_PS            2
 #define        IA64_ITIR_PS_LEN        6
-#define IA64_ITIR_PS_MASK      (((__IA64_UL(1) << IA64_ITIR_PS_LEN) - 1) \
-                                                       << IA64_ITIR_PS)
+#define        IA64_ITIR_PS_MASK       (((__IA64_UL(1) << IA64_ITIR_PS_LEN) - 
1) \
+                                                       << IA64_ITIR_PS)
 #define        IA64_ITIR_KEY           8
 #define        IA64_ITIR_KEY_LEN       24
 #define        IA64_ITIR_KEY_MASK      (((__IA64_UL(1) << IA64_ITIR_KEY_LEN) - 
1) \
                                                        << IA64_ITIR_KEY)
-#define IA64_ITIR_PS_KEY(_ps, _key)    (((_ps) << IA64_ITIR_PS) | \
-                                       (((_key) << IA64_ITIR_KEY)))
+#define        IA64_ITIR_PS_KEY(_ps, _key)     (((_ps) << IA64_ITIR_PS) | \
+                                        (((_key) << IA64_ITIR_KEY)))
+
+/* Define Protection Key Register (PKR) */
+#define        IA64_PKR_V              0
+#define        IA64_PKR_WD             1
+#define        IA64_PKR_RD             2
+#define        IA64_PKR_XD             3
+#define        IA64_PKR_MBZ0           4
+#define        IA64_PKR_KEY            8
+#define        IA64_PKR_KEY_LEN        24
+#define        IA64_PKR_MBZ1           32
+
+#define        IA64_PKR_VALID          (1 << IA64_PKR_V)
+#define        IA64_PKR_KEY_MASK       (((__IA64_UL(1) << IA64_PKR_KEY_LEN) - 
1) \
+                                                       << IA64_PKR_KEY)
+
+#define        XEN_IA64_NPKRS          15      /* Number of pkr's in PV */
 
 #endif /* _ASM_IA64_XENKREGS_H */
diff -r 32825349924d -r 522a1932111f xen/include/asm-ia64/xenprocessor.h
--- a/xen/include/asm-ia64/xenprocessor.h       Mon Jul 30 16:01:05 2007 -0600
+++ b/xen/include/asm-ia64/xenprocessor.h       Mon Jul 30 16:07:11 2007 -0600
@@ -237,6 +237,19 @@ typedef union {
     u64 itir;
 } ia64_itir_t;
 
+typedef union {
+       u64 val;
+       struct {
+               u64 v  : 1;
+               u64 wd : 1;
+               u64 rd : 1;
+               u64 xd : 1;
+               u64 reserved1 : 4;
+               u64 key : 24;
+               u64 reserved2 : 32;
+       };
+} ia64_pkr_t;
+
 #define dump_execution_state() printk("FIXME: implement ia64 
dump_execution_state()\n");
 
 #endif // _ASM_IA64_XENPROCESSOR_H

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