# HG changeset patch # User dietmar.hahn@xxxxxxxxxxxxxxxxxxx # Node ID 7f0fb2ee114fbc1467d35c56cf27392d1d4b6f58 # Parent 87b0b6a08dbdf5882c6223b0b6b7b189a15b0482 This patch adds protection key handling to mini-os for region 5 and region 7. It's for testing the hypervisor protection key support. Signed-off-by: Dietmar Hahn diff -r 87b0b6a08dbd -r 7f0fb2ee114f extras/mini-os/arch/ia64/common.c --- a/extras/mini-os/arch/ia64/common.c Mon Jul 9 09:22:58 2007 -0600 +++ b/extras/mini-os/arch/ia64/common.c Wed Jul 11 15:42:54 2007 +0200 @@ -103,7 +103,7 @@ map_pal_code(void) */ ia64_ptc_l(machineFwG.ia64_pal_base, PTE_PS_16K); ia64_write_itr_i(&pte, IA64_TR_PAL, - (uint64_t) machineFwG.ia64_pal_base, PTE_PS_16K, 0); + (uint64_t)machineFwG.ia64_pal_base, PTE_PS_16K, IA64_KEY_REG7); xen_set_virtual_psr_ic(1); } @@ -180,6 +180,19 @@ init_boot_params(void) bootverbose = 1; } +static void +set_opt_feature(void) +{ + struct xen_ia64_opt_feature optf; + optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG7; + optf.on = XEN_IA64_OPTF_ON; + optf.pgprot = ((1<