diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-08 15:02:43 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-03-08 15:02:43 +0100 |
commit | 510fced78b2df0c174000891c993f41b37529e33 (patch) | |
tree | 5aa950792ca235efdf7613b0275d7a8587900cd8 /xen/include/asm-x86/regs.h | |
parent | 3d4188af3d1065572017a7287456d163d8e103d3 (diff) | |
download | xen-510fced78b2df0c174000891c993f41b37529e33.tar.gz xen-510fced78b2df0c174000891c993f41b37529e33.tar.bz2 xen-510fced78b2df0c174000891c993f41b37529e33.zip |
Lower-casify some macros, and rename kernel_mode() to guest_kernel_mode().
Fix the macro so that it evaluates false if the given register context is
not a valid guest context.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/asm-x86/regs.h')
-rw-r--r-- | xen/include/asm-x86/regs.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xen/include/asm-x86/regs.h b/xen/include/asm-x86/regs.h index 55ac21b1d3..8ba10c4722 100644 --- a/xen/include/asm-x86/regs.h +++ b/xen/include/asm-x86/regs.h @@ -31,17 +31,17 @@ enum EFLAGS { EF_ID = 0x00200000, /* id */ }; -#define GUEST_MODE(r) \ +#define guest_mode(r) \ ({ \ unsigned long diff = (char *)guest_cpu_user_regs() - (char *)(r); \ /* Frame pointer must point into current CPU stack. */ \ ASSERT(diff < STACK_SIZE); \ /* If a guest frame, it must be have guest privs (unless HVM guest). */ \ /* We permit CS==0 which can come from an uninitialised trap entry. */ \ - ASSERT((diff != 0) || VM86_MODE(r) || ((r->cs&3) >= GUEST_KERNEL_RPL) || \ - (r->cs == 0) || HVM_DOMAIN(current)); \ + ASSERT((diff != 0) || vm86_mode(r) || ((r->cs&3) >= GUEST_KERNEL_RPL) || \ + (r->cs == 0) || hvm_guest(current)); \ /* If not a guest frame, it must be a hypervisor frame. */ \ - ASSERT((diff == 0) || (!VM86_MODE(r) && (r->cs == __HYPERVISOR_CS))); \ + ASSERT((diff == 0) || (!vm86_mode(r) && (r->cs == __HYPERVISOR_CS))); \ /* Return TRUE if it's a guest frame. */ \ (diff == 0); \ }) |