# HG changeset patch # User gingold@virtu10 # Node ID c52d826282cc89657fb247bf9608f7f9a7db40e7 # Parent 01bc4785e5c7656a7cbf4eb00d9f6f4a640bb52d Cleanup (mainly for privify handling). Signed-off-by: Tristan Gingold diff -r 01bc4785e5c7 -r c52d826282cc xen/arch/ia64/xen/faults.c --- a/xen/arch/ia64/xen/faults.c Thu Jun 15 10:36:10 2006 +0200 +++ b/xen/arch/ia64/xen/faults.c Thu Jun 15 12:16:15 2006 +0200 @@ -372,14 +372,16 @@ ia64_fault (unsigned long vector, unsign { struct pt_regs *regs = (struct pt_regs *) &stack; unsigned long code; - static const char *reason[] = { + static const char * const reason[] = { "IA-64 Illegal Operation fault", "IA-64 Privileged Operation fault", "IA-64 Privileged Register fault", "IA-64 Reserved Register/Field fault", "Disabled Instruction Set Transition fault", - "Unknown fault 5", "Unknown fault 6", "Unknown fault 7", "Illegal Hazard fault", - "Unknown fault 9", "Unknown fault 10", "Unknown fault 11", "Unknown fault 12", + "Unknown fault 5", "Unknown fault 6", + "Unknown fault 7", "Illegal Hazard fault", + "Unknown fault 9", "Unknown fault 10", + "Unknown fault 11", "Unknown fault 12", "Unknown fault 13", "Unknown fault 14", "Unknown fault 15" }; @@ -566,10 +568,6 @@ ia64_handle_privop (unsigned long ifa, s } } -/* Used in vhpt.h. */ -#define INTR_TYPE_MAX 10 -UINT64 int_counts[INTR_TYPE_MAX]; - void ia64_handle_reflection (unsigned long ifa, struct pt_regs *regs, unsigned long isr, unsigned long iim, unsigned long vector) { @@ -578,7 +576,7 @@ ia64_handle_reflection (unsigned long if unsigned long psr = regs->cr_ipsr; /* Following faults shouldn'g be seen from Xen itself */ - if (!(psr & IA64_PSR_CPL)) BUG(); + BUG_ON (!(psr & IA64_PSR_CPL)); switch(vector) { case 8: @@ -601,6 +599,7 @@ ia64_handle_reflection (unsigned long if break; case 26: if (((isr >> 4L) & 0xfL) == 1) { + /* Fault is due to a register NaT consumption fault. */ //regs->eml_unat = 0; FIXME: DO WE NEED THIS?? printf("ia64_handle_reflection: handling regNaT fault\n"); vector = IA64_NAT_CONSUMPTION_VECTOR; break; @@ -612,6 +611,9 @@ ia64_handle_reflection (unsigned long if vector = IA64_NAT_CONSUMPTION_VECTOR; break; } #endif +#if CONFIG_PRIVIFY + /* Some privified operations are coded using reg+64 instead + of reg. */ printf("*** NaT fault... attempting to handle as privop\n"); printf("isr=%016lx, ifa=%016lx, iip=%016lx, ipsr=%016lx\n", isr, ifa, regs->cr_iip, psr); @@ -622,6 +624,7 @@ ia64_handle_reflection (unsigned long if printf("*** Handled privop masquerading as NaT fault\n"); return; } +#endif vector = IA64_NAT_CONSUMPTION_VECTOR; break; case 27: //printf("*** Handled speculation vector, itc=%lx!\n",ia64_get_itc()); diff -r 01bc4785e5c7 -r c52d826282cc xen/arch/ia64/xen/privop.c --- a/xen/arch/ia64/xen/privop.c Thu Jun 15 10:36:10 2006 +0200 +++ b/xen/arch/ia64/xen/privop.c Thu Jun 15 12:16:15 2006 +0200 @@ -21,7 +21,10 @@ long priv_verbose=0; long priv_verbose=0; /* Set to 1 to handle privified instructions from the privify tool. */ -static const int privify_en = 0; +#ifndef CONFIG_PRIVIFY +#define CONFIG_PRIVIFY 0 +#endif +static const int privify_en = CONFIG_PRIVIFY; /************************************************************************** Hypercall bundle creation diff -r 01bc4785e5c7 -r c52d826282cc xen/include/asm-ia64/config.h --- a/xen/include/asm-ia64/config.h Thu Jun 15 10:36:10 2006 +0200 +++ b/xen/include/asm-ia64/config.h Thu Jun 15 12:16:15 2006 +0200 @@ -1,9 +1,6 @@ #ifndef _IA64_CONFIG_H_ #define _IA64_CONFIG_H_ -#undef USE_PAL_EMULATOR -// control flags for turning on/off features under test -#undef DOMU_BUILD_STAGING #define VHPT_GLOBAL #undef DEBUG_PFMON @@ -170,12 +167,6 @@ void sort_extable(struct exception_table struct exception_table_entry *finish); void sort_main_extable(void); -#if 0 /* Already defined in xen/lib.h */ -#define printk printf -#endif - -#undef __ARCH_IRQ_STAT - #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right??? // see drivers/char/console.c @@ -284,4 +275,7 @@ extern int ht_per_core; Old as doesn't handle this. */ #define HAVE_SERIALIZE_DIRECTIVE +/* Define CONFIG_PRIVIFY to support privified OS (deprecated). */ +#undef CONFIG_PRIVIFY + #endif /* _IA64_CONFIG_H_ */