debuggers.hg

view xen/common/compat/kernel.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 407e2e7dca5b
children
line source
1 /******************************************************************************
2 * kernel.c
3 */
5 #include <xen/config.h>
6 #include <xen/init.h>
7 #include <xen/lib.h>
8 #include <xen/errno.h>
9 #include <xen/version.h>
10 #include <xen/sched.h>
11 #include <xen/nmi.h>
12 #include <xen/guest_access.h>
13 #include <asm/current.h>
14 #include <compat/xen.h>
15 #include <compat/nmi.h>
16 #include <compat/version.h>
18 extern xen_commandline_t saved_cmdline;
20 #define xen_extraversion compat_extraversion
21 #define xen_extraversion_t compat_extraversion_t
23 #define xen_compile_info compat_compile_info
24 #define xen_compile_info_t compat_compile_info_t
26 CHECK_TYPE(capabilities_info);
28 #define xen_platform_parameters compat_platform_parameters
29 #define xen_platform_parameters_t compat_platform_parameters_t
30 #undef HYPERVISOR_VIRT_START
31 #define HYPERVISOR_VIRT_START HYPERVISOR_COMPAT_VIRT_START(current->domain)
33 #define xen_changeset_info compat_changeset_info
34 #define xen_changeset_info_t compat_changeset_info_t
36 #define xen_feature_info compat_feature_info
37 #define xen_feature_info_t compat_feature_info_t
39 CHECK_TYPE(domain_handle);
41 #define xennmi_callback compat_nmi_callback
42 #define xennmi_callback_t compat_nmi_callback_t
44 #define DO(fn) int compat_##fn
45 #define COMPAT
47 #include "../kernel.c"
49 /*
50 * Local variables:
51 * mode: C
52 * c-set-style: "BSD"
53 * c-basic-offset: 4
54 * tab-width: 4
55 * indent-tabs-mode: nil
56 * End:
57 */