debuggers.hg
view xen/include/asm-x86/regs.h @ 22855:1d1eec7e1fb4
xl: Perform minimal validation of virtual disk file while parsing config file
This patch performs some very basic validation on the virtual disk
file passed through the config file. This validation ensures that we
don't go too far with the initialization like spawn qemu and more
while there could be some potentially fundamental issues.
[ Patch fixed up to work with PHYSTYPE_EMPTY 22808:6ec61438713a -iwj ]
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This patch performs some very basic validation on the virtual disk
file passed through the config file. This validation ensures that we
don't go too far with the initialization like spawn qemu and more
while there could be some potentially fundamental issues.
[ Patch fixed up to work with PHYSTYPE_EMPTY 22808:6ec61438713a -iwj ]
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author | Kamala Narasimhan <kamala.narasimhan@gmail.com> |
---|---|
date | Tue Jan 25 18:09:49 2011 +0000 (2011-01-25) |
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__ */