debuggers.hg

view unmodified_drivers/linux-2.6/platform-pci/xen_support.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 049d4baa9965
children
line source
1 /******************************************************************************
2 * support.c
3 * Xen module support functions.
4 * Copyright (C) 2004, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17 * Place - Suite 330, Boston, MA 02111-1307 USA.
18 *
19 */
21 #include <linux/module.h>
22 #include <linux/init.h>
23 #include <linux/mm.h>
24 #include <xen/evtchn.h>
25 #include <xen/interface/xen.h>
26 #include <asm/hypervisor.h>
27 #include "platform-pci.h"
29 #ifdef HAVE_XEN_PLATFORM_COMPAT_H
30 #include <xen/platform-compat.h>
31 #endif
33 #if defined (__ia64__)
34 unsigned long __hypercall(unsigned long a1, unsigned long a2,
35 unsigned long a3, unsigned long a4,
36 unsigned long a5, unsigned long cmd)
37 {
38 unsigned long __res;
39 __asm__ __volatile__ (";;\n"
40 "mov r2=%1\n"
41 "break 0x1000 ;;\n"
42 "mov %0=r8 ;;\n"
43 : "=r"(__res) : "r"(cmd) : "r2", "r8", "memory");
45 return __res;
46 }
47 EXPORT_SYMBOL(__hypercall);
49 int HYPERVISOR_grant_table_op(unsigned int cmd, void *uop, unsigned int count)
50 {
51 return xencomm_hypercall_grant_table_op(cmd, uop, count);
52 }
53 EXPORT_SYMBOL(HYPERVISOR_grant_table_op);
55 /* without using balloon driver on PV-on-HVM for ia64 */
56 void balloon_update_driver_allowance(long delta)
57 {
58 /* nothing */
59 }
60 EXPORT_SYMBOL_GPL(balloon_update_driver_allowance);
62 void balloon_release_driver_page(struct page *page)
63 {
64 /* nothing */
65 }
66 EXPORT_SYMBOL_GPL(balloon_release_driver_page);
67 #endif /* __ia64__ */
69 void xen_machphys_update(unsigned long mfn, unsigned long pfn)
70 {
71 BUG();
72 }
73 EXPORT_SYMBOL(xen_machphys_update);