WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] Defined guest_mode and use it inst

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Defined guest_mode and use it instead of user_mode.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Jun 2007 03:14:59 -0700
Delivery-date: Mon, 04 Jun 2007 03:31:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] Defined guest_mode and use it instead of user_mode., Xen patchbot-unstable <=