debuggers.hg

view xen/arch/ia64/asm-xsi-offsets.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 d12ea0bfecce
children
line source
1 /* -*- Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
2 /*
3 * asm-xsi-offsets.c_
4 * Copyright (c) 2005, Intel Corporation.
5 * Kun Tian (Kevin Tian) <kevin.tian@intel.com>
6 * Eddie Dong <eddie.dong@intel.com>
7 * Fred Yang <fred.yang@intel.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms and conditions of the GNU General Public License,
11 * version 2, as published by the Free Software Foundation.
12 *
13 * This program is distributed in the hope it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
20 * Place - Suite 330, Boston, MA 02111-1307 USA.
21 *
22 */
24 /*
25 * Generate definitions needed by assembly language modules.
26 * This code generates raw asm output which is post-processed
27 * to extract and format the required data.
28 */
30 #include <xen/config.h>
31 #include <xen/sched.h>
32 #include <asm/processor.h>
33 #include <asm/ptrace.h>
34 #include <public/xen.h>
35 #include <asm/tlb.h>
36 #include <asm/regs.h>
38 #define task_struct vcpu
40 #define DEFINE(sym, val) \
41 asm volatile("\n->" #sym " (%0) " #val : : "i" (val))
43 #define BLANK() asm volatile("\n->" : : )
45 #define DEFINE_MAPPED_REG_OFS(sym, field) \
46 DEFINE(sym, (XMAPPEDREGS_OFS + offsetof(mapped_regs_t, field)))
48 void foo(void)
49 {
50 DEFINE_MAPPED_REG_OFS(XSI_PSR_I_ADDR_OFS, interrupt_mask_addr);
51 DEFINE_MAPPED_REG_OFS(XSI_IPSR_OFS, ipsr);
52 DEFINE_MAPPED_REG_OFS(XSI_IIP_OFS, iip);
53 DEFINE_MAPPED_REG_OFS(XSI_IFS_OFS, ifs);
54 DEFINE_MAPPED_REG_OFS(XSI_PRECOVER_IFS_OFS, precover_ifs);
55 DEFINE_MAPPED_REG_OFS(XSI_ISR_OFS, isr);
56 DEFINE_MAPPED_REG_OFS(XSI_IFA_OFS, ifa);
57 DEFINE_MAPPED_REG_OFS(XSI_IIPA_OFS, iipa);
58 DEFINE_MAPPED_REG_OFS(XSI_IIM_OFS, iim);
59 DEFINE_MAPPED_REG_OFS(XSI_TPR_OFS, tpr);
60 DEFINE_MAPPED_REG_OFS(XSI_IHA_OFS, iha);
61 DEFINE_MAPPED_REG_OFS(XSI_ITIR_OFS, itir);
62 DEFINE_MAPPED_REG_OFS(XSI_ITV_OFS, itv);
63 DEFINE_MAPPED_REG_OFS(XSI_PTA_OFS, pta);
64 DEFINE_MAPPED_REG_OFS(XSI_VPSR_DFH_OFS, vpsr_dfh);
65 DEFINE_MAPPED_REG_OFS(XSI_HPSR_DFH_OFS, hpsr_dfh);
66 DEFINE_MAPPED_REG_OFS(XSI_PSR_IC_OFS, interrupt_collection_enabled);
67 DEFINE_MAPPED_REG_OFS(XSI_VPSR_PP_OFS, vpsr_pp);
68 DEFINE_MAPPED_REG_OFS(XSI_METAPHYS_OFS, metaphysical_mode);
69 DEFINE_MAPPED_REG_OFS(XSI_BANKNUM_OFS, banknum);
70 DEFINE_MAPPED_REG_OFS(XSI_BANK0_R16_OFS, bank0_regs[0]);
71 DEFINE_MAPPED_REG_OFS(XSI_BANK1_R16_OFS, bank1_regs[0]);
72 DEFINE_MAPPED_REG_OFS(XSI_B0NATS_OFS, vbnat);
73 DEFINE_MAPPED_REG_OFS(XSI_B1NATS_OFS, vnat);
74 DEFINE_MAPPED_REG_OFS(XSI_RR0_OFS, rrs[0]);
75 DEFINE_MAPPED_REG_OFS(XSI_KR0_OFS, krs[0]);
76 }