debuggers.hg

view xen/common/compat/multicall.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 63211a8027fa
children
line source
1 /******************************************************************************
2 * multicall.c
3 */
5 #include <xen/config.h>
6 #include <xen/types.h>
7 #include <xen/multicall.h>
9 #define COMPAT
10 typedef int ret_t;
11 #undef do_multicall_call
13 static inline void xlat_multicall_entry(struct mc_state *mcs)
14 {
15 int i;
16 for (i=0; i<6; i++)
17 mcs->compat_call.args[i] = mcs->call.args[i];
18 }
20 DEFINE_XEN_GUEST_HANDLE(multicall_entry_compat_t);
21 #define multicall_entry compat_multicall_entry
22 #define multicall_entry_t multicall_entry_compat_t
23 #define do_multicall_call compat_multicall_call
24 #define call compat_call
25 #define do_multicall(l, n) compat_multicall(_##l, n)
26 #define _XEN_GUEST_HANDLE(t) XEN_GUEST_HANDLE(t)
28 #include "../multicall.c"
30 /*
31 * Local variables:
32 * mode: C
33 * c-set-style: "BSD"
34 * c-basic-offset: 4
35 * tab-width: 4
36 * indent-tabs-mode: nil
37 * End:
38 */