# HG changeset patch # User dietmar.hahn@xxxxxxxxxxxxxxxxxxx # Node ID 31b326c5b624d4c07dfa7f27298ee1f6a95c22df # Parent 451967deefdc46254c2b3af7d0f8e00284ab29b2 Added new declarations for protection keys and the define XEN_IA64_NPKRS representing number of pkr's for PV domains. Signed-off-by: Dietmar Hahn diff -r 451967deefdc -r 31b326c5b624 xen/arch/ia64/xen/fw_emul.c --- a/xen/arch/ia64/xen/fw_emul.c Tue Jul 24 09:38:20 2007 +0200 +++ b/xen/arch/ia64/xen/fw_emul.c Tue Jul 24 10:13:49 2007 +0200 @@ -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 451967deefdc -r 31b326c5b624 xen/include/asm-ia64/xenkregs.h --- a/xen/include/asm-ia64/xenkregs.h Tue Jul 24 09:38:20 2007 +0200 +++ b/xen/include/asm-ia64/xenkregs.h Tue Jul 24 10:13:49 2007 +0200 @@ -38,13 +38,31 @@ /* 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) \ +#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) | \ +#define IA64_ITIR_PS_KEY(_ps, _key) (((_ps) << IA64_ITIR_PS) | \ (((_key) << IA64_ITIR_KEY))) +/* Define Protection Key Register (PKR) */ + +#define XEN_IA64_NPKRS 15 /* Number of pkr's in PV */ + +#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)<