debuggers.hg

view xen/include/asm-x86/regs.h @ 22906:700ac6445812

Now add KDB to the non-kdb tree
author Mukesh Rathor
date Thu Feb 03 15:42:41 2011 -0800 (2011-02-03)
parents 07befd9cf6d3
children
line source
2 #ifndef __X86_REGS_H__
3 #define __X86_REGS_H__
5 #ifdef __x86_64__
6 #include <asm/x86_64/regs.h>
7 #else
8 #include <asm/x86_32/regs.h>
9 #endif
11 #define guest_mode(r) \
12 ({ \
13 unsigned long diff = (char *)guest_cpu_user_regs() - (char *)(r); \
14 /* Frame pointer must point into current CPU stack. */ \
15 ASSERT(diff < STACK_SIZE); \
16 /* If not a guest frame, it must be a hypervisor frame. */ \
17 ASSERT((diff == 0) || (!vm86_mode(r) && (r->cs == __HYPERVISOR_CS))); \
18 /* Return TRUE if it's a guest frame. */ \
19 (diff == 0); \
20 })
22 #define return_reg(v) ((v)->arch.guest_context.user_regs.eax)
24 #endif /* __X86_REGS_H__ */