ia64/xen-unstable

view xen/include/asm-x86/xenoprof.h @ 15812:86a154e1ef5d

[HVM] Shadow: don't shadow the p2m table.
For HVM vcpus with paging disabled, we used to shadow the p2m table,
and skip the p2m lookup to go from gfn to mfn. Instead, we now
provide a simple pagetable that gives a one-to-one mapping of 4GB, and
shadow that, making the translations from gfn to mfn via the p2m.
This removes the paging-disabled special-case code from the shadow
fault handler, and allows us to expand the p2m interface, since all HVM
translations now go through the same p2m lookups.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Fri Aug 31 11:06:22 2007 +0100 (2007-08-31)
parents 26eef8426110
children 44ec075760b6
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);
45 struct vcpu;
46 struct cpu_user_regs;
48 int xenoprofile_get_mode(struct vcpu *v, struct cpu_user_regs * const regs);
50 static inline int xenoprof_backtrace_supported(void)
51 {
52 return 1;
53 }
55 void xenoprof_backtrace(
56 struct domain *d, struct vcpu *vcpu,
57 struct cpu_user_regs *const regs, unsigned long depth, int mode);
59 #define xenoprof_shared_gmfn(d, gmaddr, maddr) \
60 do { \
61 (void)(maddr); \
62 gdprintk(XENLOG_WARNING, \
63 "xenoprof/x86 with autotranslated mode enabled" \
64 "isn't supported yet\n"); \
65 } while (0)
67 #endif /* __ASM_X86_XENOPROF_H__ */
69 /*
70 * Local variables:
71 * mode: C
72 * c-set-style: "BSD"
73 * c-basic-offset: 4
74 * tab-width: 4
75 * indent-tabs-mode: nil
76 * End:
77 */