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] Fix up #PF error code before propagating to guest kernel

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix up #PF error code before propagating to guest kernel.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Mar 2006 12:08:08 +0000
Delivery-date: Wed, 08 Mar 2006 12:09:04 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID ccca12a2bee209dc50a6651c7ffc39a383a92dc0
# Parent  503c4d8454e5fa2d8cbc267dd2c8c0063cc5d613
Fix up #PF error code before propagating to guest kernel.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 503c4d8454e5 -r ccca12a2bee2 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Tue Mar  7 17:41:37 2006
+++ b/xen/arch/x86/traps.c      Wed Mar  8 09:33:31 2006
@@ -431,6 +431,11 @@
     v->arch.guest_context.ctrlreg[2] = addr;
     v->vcpu_info->arch.cr2           = addr;
 
+    /* Re-set error_code.user flag appropriately for the guest. */
+    error_code &= ~4;
+    if ( !KERNEL_MODE(v, guest_cpu_user_regs()) )
+        error_code |= 4;
+
     ti = &v->arch.guest_context.trap_ctxt[TRAP_page_fault];
     tb->flags = TBF_EXCEPTION | TBF_EXCEPTION_ERRCODE;
     tb->error_code = error_code;
@@ -541,7 +546,7 @@
  * #PF error code:
  *  Bit 0: Protection violation (=1) ; Page not present (=0)
  *  Bit 1: Write access
- *  Bit 2: Supervisor mode
+ *  Bit 2: User mode (=1) ; Supervisor mode (=0)
  *  Bit 3: Reserved bit violation
  *  Bit 4: Instruction fetch
  */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix up #PF error code before propagating to guest kernel., Xen patchbot -unstable <=