ia64/xen-unstable

view xen/include/asm-x86/xenoprof.h @ 12541:1d7d5d48fcdc

[XENOPROFILE] Make xenoprof arch-generic with dynamic mapping/unmapping xenoprof
buffer support and auto translated mode support.
renamed xenoprof_get_buffer::buf_maddr, xenoprof_passive::buf_maddr to
xenoprof_get_buffer::buf_gmaddr, xenoprof_passive::buf_gmaddr
to support auto translated mode. With auto translated mode enabled,
it is gmaddr, not maddr.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>

Simplify the share function.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Nov 22 10:09:28 2006 +0000 (2006-11-22)
parents da5c5fc8908f
children a7601de2f733
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_init(int *num_events, int *is_primary, char *cpu_type);
27 int nmi_reserve_counters(void);
28 int nmi_setup_events(void);
29 int nmi_enable_virq(void);
30 int nmi_start(void);
31 void nmi_stop(void);
32 void nmi_disable_virq(void);
33 void nmi_release_counters(void);
35 #define xenoprof_arch_init(num_events, is_primary, cpu_type) \
36 nmi_init(num_events, is_primary, cpu_type)
37 #define xenoprof_arch_reserve_counters() nmi_reserve_counters()
38 #define xenoprof_arch_setup_events() nmi_setup_events()
39 #define xenoprof_arch_enable_virq() nmi_enable_virq()
40 #define xenoprof_arch_start() nmi_start()
41 #define xenoprof_arch_stop() nmi_stop()
42 #define xenoprof_arch_disable_virq() nmi_disable_virq()
43 #define xenoprof_arch_release_counters() nmi_release_counters()
45 int xenoprof_arch_counter(XEN_GUEST_HANDLE(void) arg);
47 struct vcpu;
48 struct cpu_user_regs;
49 int xenoprofile_get_mode(struct vcpu *v, struct cpu_user_regs * const regs);
50 #define xenoprof_shared_gmfn(d, gmaddr, maddr) \
51 do { \
52 (void)(maddr); \
53 gdprintk(XENLOG_WARNING, \
54 "xenoprof/x86 with autotranslated mode enabled" \
55 "isn't supported yet\n"); \
56 } while (0)
58 #endif /* __ASM_X86_XENOPROF_H__ */
60 /*
61 * Local variables:
62 * mode: C
63 * c-set-style: "BSD"
64 * c-basic-offset: 4
65 * tab-width: 4
66 * indent-tabs-mode: nil
67 * End:
68 */