debuggers.hg

view xen/include/asm-x86/x86_32/regs.h @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children b22f9ab1716a
line source
1 #ifndef _I386_REGS_H
2 #define _I386_REGS_H
4 #include <xen/types.h>
5 #include <public/xen.h>
7 #define vm86_mode(r) ((r)->eflags & EF_VM)
8 #define ring_0(r) (((r)->cs & 3) == 0)
9 #define ring_1(r) (((r)->cs & 3) == 1)
10 #define ring_2(r) (((r)->cs & 3) == 2)
11 #define ring_3(r) (((r)->cs & 3) == 3)
13 #define guest_kernel_mode(v, r) \
14 (!vm86_mode(r) && ring_1(r))
16 #define permit_softint(dpl, v, r) \
17 ((dpl) >= (vm86_mode(r) ? 3 : ((r)->cs & 3)))
19 /* Check for null trap callback handler: Is the selector null (0-3)? */
20 #define null_trap_bounce(v, tb) (((tb)->cs & ~3) == 0)
22 /* Number of bytes of on-stack execution state to be context-switched. */
23 #define CTXT_SWITCH_STACK_BYTES (sizeof(struct cpu_user_regs))
25 #endif