|
|
![](http://www.xen.org/images/globals/pixel.gif) |
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Fix up #PF error code before propagating to guest kernel
# 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 <=
|
|
|
|
|