[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] Defined guest_mode and use it instead of user_mode.
# HG changeset patch # User Alex Williamson <alex.williamson@xxxxxx> # Date 1178825373 21600 # Node ID d431761a032a791bbb5924d56851f594c0078ce4 # Parent eabda101b0c54ac51d4a7d335e45144425ca2fda [IA64] Defined guest_mode and use it instead of user_mode. Signed-off-by: Tristan Gingold <tgingold@xxxxxxx> --- xen/arch/ia64/vmx/vmx_process.c | 2 +- xen/arch/ia64/xen/faults.c | 2 +- xen/arch/ia64/xen/xenmisc.c | 2 +- xen/include/asm-ia64/linux-xen/asm/ptrace.h | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff -r eabda101b0c5 -r d431761a032a xen/arch/ia64/vmx/vmx_process.c --- a/xen/arch/ia64/vmx/vmx_process.c Tue May 08 13:12:52 2007 -0600 +++ b/xen/arch/ia64/vmx/vmx_process.c Thu May 10 13:29:33 2007 -0600 @@ -164,7 +164,7 @@ vmx_ia64_handle_break (unsigned long ifa if (iim == 0) vmx_die_if_kernel("Break 0 in Hypervisor.", regs, iim); - if (!user_mode(regs)) { + if (ia64_psr(regs)->cpl == 0) { /* Allow hypercalls only when cpl = 0. */ if (iim == d->arch.breakimm) { ia64_hypercall(regs); diff -r eabda101b0c5 -r d431761a032a xen/arch/ia64/xen/faults.c --- a/xen/arch/ia64/xen/faults.c Tue May 08 13:12:52 2007 -0600 +++ b/xen/arch/ia64/xen/faults.c Thu May 10 13:29:33 2007 -0600 @@ -209,7 +209,7 @@ void ia64_do_page_fault(unsigned long ad if (is_ptc_l_needed) vcpu_ptc_l(current, address, logps); - if (!user_mode(regs)) { + if (!guest_mode(regs)) { /* The fault occurs inside Xen. */ if (!ia64_done_with_exception(regs)) { // should never happen. If it does, region 0 addr may diff -r eabda101b0c5 -r d431761a032a xen/arch/ia64/xen/xenmisc.c --- a/xen/arch/ia64/xen/xenmisc.c Tue May 08 13:12:52 2007 -0600 +++ b/xen/arch/ia64/xen/xenmisc.c Thu May 10 13:29:33 2007 -0600 @@ -79,7 +79,7 @@ void console_print(char *msg) void die_if_kernel(char *str, struct pt_regs *regs, long err) { - if (user_mode(regs)) + if (guest_mode(regs)) return; printk("%s: %s %ld\n", __func__, str, err); diff -r eabda101b0c5 -r d431761a032a xen/include/asm-ia64/linux-xen/asm/ptrace.h --- a/xen/include/asm-ia64/linux-xen/asm/ptrace.h Tue May 08 13:12:52 2007 -0600 +++ b/xen/include/asm-ia64/linux-xen/asm/ptrace.h Thu May 10 13:29:33 2007 -0600 @@ -265,7 +265,11 @@ struct switch_stack { /* given a pointer to a task_struct, return the user's pt_regs */ # define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1) # define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr) +#ifdef XEN +# define guest_mode(regs) (ia64_psr(regs)->cpl != 0) +#else # define user_mode(regs) (((struct ia64_psr *) &(regs)->cr_ipsr)->cpl != 0) +#endif # define user_stack(task,regs) ((long) regs - (long) task == IA64_STK_OFFSET - sizeof(*regs)) # define fsys_mode(task,regs) \ ({ \ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |