debuggers.hg

view xen/include/asm-x86/traps.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>
author Kamala Narasimhan <kamala.narasimhan@gmail.com>
date Tue Jan 25 18:09:49 2011 +0000 (2011-01-25)
parents 6233eb0f29ba
children
line source
1 /*
2 * Copyright (c) 2007, 2008 Advanced Micro Devices, Inc.
3 * Author: Christoph Egger <Christoph.Egger@amd.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
20 #ifndef ASM_TRAP_H
21 #define ASM_TRAP_H
23 struct softirq_trap {
24 struct domain *domain; /* domain to inject trap */
25 struct vcpu *vcpu; /* vcpu to inject trap */
26 int processor; /* physical cpu to inject trap */
27 };
29 struct cpu_user_regs;
31 extern void machine_check_vector(struct cpu_user_regs *regs, long error_code);
33 void async_exception_cleanup(struct vcpu *);
35 /**
36 * guest_has_trap_callback
37 *
38 * returns true (non-zero) if guest registered a trap handler
39 */
40 extern int guest_has_trap_callback(struct domain *d, uint16_t vcpuid,
41 unsigned int trap_nr);
43 /**
44 * send_guest_trap
45 *
46 * delivers trap to guest analogous to send_guest_global_virq
47 * return 0 on successful delivery
48 */
49 extern int send_guest_trap(struct domain *d, uint16_t vcpuid,
50 unsigned int trap_nr);
52 #endif /* ASM_TRAP_H */