debuggers.hg

view xen/include/asm-x86/xenoprof.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 cb82fbef3366
children
line source
1 /******************************************************************************
2 * asm-x86/xenoprof.h
3 * xenoprof x86 arch specific header file
4 *
5 * Copyright (c) 2006 Isaku Yamahata <yamahata at valinux co jp>
6 * VA Linux Systems Japan K.K.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
23 #ifndef __ASM_X86_XENOPROF_H__
24 #define __ASM_X86_XENOPROF_H__
26 int nmi_reserve_counters(void);
27 int nmi_setup_events(void);
28 int nmi_enable_virq(void);
29 int nmi_start(void);
30 void nmi_stop(void);
31 void nmi_disable_virq(void);
32 void nmi_release_counters(void);
34 int xenoprof_arch_init(int *num_events, char *cpu_type);
35 #define xenoprof_arch_reserve_counters() nmi_reserve_counters()
36 #define xenoprof_arch_setup_events() nmi_setup_events()
37 #define xenoprof_arch_enable_virq() nmi_enable_virq()
38 #define xenoprof_arch_start() nmi_start()
39 #define xenoprof_arch_stop() nmi_stop()
40 #define xenoprof_arch_disable_virq() nmi_disable_virq()
41 #define xenoprof_arch_release_counters() nmi_release_counters()
43 int xenoprof_arch_counter(XEN_GUEST_HANDLE(void) arg);
44 int compat_oprof_arch_counter(XEN_GUEST_HANDLE(void) arg);
45 int xenoprof_arch_ibs_counter(XEN_GUEST_HANDLE(void) arg);
47 struct vcpu;
48 struct cpu_user_regs;
50 /* AMD IBS support */
51 #ifdef CONFIG_X86_64
52 void ibs_init(void);
53 extern u32 ibs_caps;
54 #else
55 static inline void ibs_init(void) {}
56 #define ibs_caps 0
57 #endif
59 int xenoprofile_get_mode(struct vcpu *v, struct cpu_user_regs * const regs);
61 static inline int xenoprof_backtrace_supported(void)
62 {
63 return 1;
64 }
66 void xenoprof_backtrace(
67 struct domain *d, struct vcpu *vcpu,
68 struct cpu_user_regs *const regs, unsigned long depth, int mode);
70 #define xenoprof_shared_gmfn(d, gmaddr, maddr) \
71 do { \
72 (void)(maddr); \
73 gdprintk(XENLOG_WARNING, \
74 "xenoprof/x86 with autotranslated mode enabled" \
75 "isn't supported yet\n"); \
76 } while (0)
77 int passive_domain_do_rdmsr(unsigned int msr, uint64_t *msr_content);
78 int passive_domain_do_wrmsr(unsigned int msr, uint64_t msr_content);
79 void passive_domain_destroy(struct vcpu *v);
81 #endif /* __ASM_X86_XENOPROF_H__ */
83 /*
84 * Local variables:
85 * mode: C
86 * c-set-style: "BSD"
87 * c-basic-offset: 4
88 * tab-width: 4
89 * indent-tabs-mode: nil
90 * End:
91 */