Add Book3s_64 intercept helpers
[linux-2.6/btrfs-unstable.git] / arch / powerpc / include / asm / kvm_book3s_64_asm.h
blob2e06ee8184ef8caef068ae2fc4496cb3404cc13c
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as
4 * published by the Free Software Foundation.
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 * Copyright SUSE Linux Products GmbH 2009
17 * Authors: Alexander Graf <agraf@suse.de>
20 #ifndef __ASM_KVM_BOOK3S_ASM_H__
21 #define __ASM_KVM_BOOK3S_ASM_H__
23 #ifdef CONFIG_KVM_BOOK3S_64_HANDLER
25 #include <asm/kvm_asm.h>
27 .macro DO_KVM intno
28 .if (\intno == BOOK3S_INTERRUPT_SYSTEM_RESET) || \
29 (\intno == BOOK3S_INTERRUPT_MACHINE_CHECK) || \
30 (\intno == BOOK3S_INTERRUPT_DATA_STORAGE) || \
31 (\intno == BOOK3S_INTERRUPT_INST_STORAGE) || \
32 (\intno == BOOK3S_INTERRUPT_DATA_SEGMENT) || \
33 (\intno == BOOK3S_INTERRUPT_INST_SEGMENT) || \
34 (\intno == BOOK3S_INTERRUPT_EXTERNAL) || \
35 (\intno == BOOK3S_INTERRUPT_ALIGNMENT) || \
36 (\intno == BOOK3S_INTERRUPT_PROGRAM) || \
37 (\intno == BOOK3S_INTERRUPT_FP_UNAVAIL) || \
38 (\intno == BOOK3S_INTERRUPT_DECREMENTER) || \
39 (\intno == BOOK3S_INTERRUPT_SYSCALL) || \
40 (\intno == BOOK3S_INTERRUPT_TRACE) || \
41 (\intno == BOOK3S_INTERRUPT_PERFMON) || \
42 (\intno == BOOK3S_INTERRUPT_ALTIVEC) || \
43 (\intno == BOOK3S_INTERRUPT_VSX)
45 b kvmppc_trampoline_\intno
46 kvmppc_resume_\intno:
48 .endif
49 .endm
51 #else
53 .macro DO_KVM intno
54 .endm
56 #endif /* CONFIG_KVM_BOOK3S_64_HANDLER */
58 #endif /* __ASM_KVM_BOOK3S_ASM_H__ */