ia64/xen-unstable

view xen/include/asm-x86/regs.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 0528bc25c404
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 enum EFLAGS {
12 EF_CF = 0x00000001,
13 EF_PF = 0x00000004,
14 EF_AF = 0x00000010,
15 EF_ZF = 0x00000040,
16 EF_SF = 0x00000080,
17 EF_TF = 0x00000100,
18 EF_IE = 0x00000200,
19 EF_DF = 0x00000400,
20 EF_OF = 0x00000800,
21 EF_IOPL = 0x00003000,
22 EF_IOPL_RING0 = 0x00000000,
23 EF_IOPL_RING1 = 0x00001000,
24 EF_IOPL_RING2 = 0x00002000,
25 EF_NT = 0x00004000, /* nested task */
26 EF_RF = 0x00010000, /* resume */
27 EF_VM = 0x00020000, /* virtual mode */
28 EF_AC = 0x00040000, /* alignment */
29 EF_VIF = 0x00080000, /* virtual interrupt */
30 EF_VIP = 0x00100000, /* virtual interrupt pending */
31 EF_ID = 0x00200000, /* id */
32 };
34 #define guest_mode(r) \
35 ({ \
36 unsigned long diff = (char *)guest_cpu_user_regs() - (char *)(r); \
37 /* Frame pointer must point into current CPU stack. */ \
38 ASSERT(diff < STACK_SIZE); \
39 /* If not a guest frame, it must be a hypervisor frame. */ \
40 ASSERT((diff == 0) || (!vm86_mode(r) && (r->cs == __HYPERVISOR_CS))); \
41 /* Return TRUE if it's a guest frame. */ \
42 (diff == 0); \
43 })
45 #endif /* __X86_REGS_H__ */