debuggers.hg

view xen/common/compat/schedule.c @ 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>
author Kamala Narasimhan <kamala.narasimhan@gmail.com>
date Tue Jan 25 18:09:49 2011 +0000 (2011-01-25)
parents 883c0080dd05
children
line source
1 /****************************************************************************
2 * schedule.c
3 *
4 */
6 #include <compat/sched.h>
8 #define COMPAT
9 #define ret_t int
11 #define do_sched_op compat_sched_op
13 #define xen_sched_shutdown sched_shutdown
14 CHECK_sched_shutdown;
15 #undef xen_sched_shutdown
17 #define xen_sched_remote_shutdown sched_remote_shutdown
18 CHECK_sched_remote_shutdown;
19 #undef xen_sched_remote_shutdown
21 static int compat_poll(struct compat_sched_poll *compat)
22 {
23 struct sched_poll native;
25 #define XLAT_sched_poll_HNDL_ports(_d_, _s_) \
26 guest_from_compat_handle((_d_)->ports, (_s_)->ports)
27 XLAT_sched_poll(&native, compat);
28 #undef XLAT_sched_poll_HNDL_ports
30 return do_poll(&native);
31 }
33 #define do_poll compat_poll
34 #define sched_poll compat_sched_poll
36 #include "../schedule.c"
38 int compat_set_timer_op(u32 lo, s32 hi)
39 {
40 return do_set_timer_op(((s64)hi << 32) | lo);
41 }
43 /*
44 * Local variables:
45 * mode: C
46 * c-set-style: "BSD"
47 * c-basic-offset: 4
48 * tab-width: 4
49 * indent-tabs-mode: nil
50 * End:
51 */