diff options
author | Alexander Graf <agraf@suse.de> | 2009-10-30 01:47:06 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-11-05 00:49:53 -0500 |
commit | 3cea8c435d0b142eb2b3dd2c411a24aa1b32bfe4 (patch) | |
tree | 549e560118c7433e6e66e2e2c1403d90396a0105 /arch/powerpc | |
parent | 4e342025e625a7271be0a9e2d20b7caf1ab70e8a (diff) |
Add Book3s_64 intercept helpers
We need to intercept interrupt vectors. To do that, let's add a file
we can always include which only activates the intercepts when we have
then configured.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/kvm_book3s_64_asm.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s_64_asm.h b/arch/powerpc/include/asm/kvm_book3s_64_asm.h new file mode 100644 index 000000000000..2e06ee8184ef --- /dev/null +++ b/arch/powerpc/include/asm/kvm_book3s_64_asm.h | |||
@@ -0,0 +1,58 @@ | |||
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. | ||
5 | * | ||
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. | ||
10 | * | ||
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. | ||
14 | * | ||
15 | * Copyright SUSE Linux Products GmbH 2009 | ||
16 | * | ||
17 | * Authors: Alexander Graf <agraf@suse.de> | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_KVM_BOOK3S_ASM_H__ | ||
21 | #define __ASM_KVM_BOOK3S_ASM_H__ | ||
22 | |||
23 | #ifdef CONFIG_KVM_BOOK3S_64_HANDLER | ||
24 | |||
25 | #include <asm/kvm_asm.h> | ||
26 | |||
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) | ||
44 | |||
45 | b kvmppc_trampoline_\intno | ||
46 | kvmppc_resume_\intno: | ||
47 | |||
48 | .endif | ||
49 | .endm | ||
50 | |||
51 | #else | ||
52 | |||
53 | .macro DO_KVM intno | ||
54 | .endm | ||
55 | |||
56 | #endif /* CONFIG_KVM_BOOK3S_64_HANDLER */ | ||
57 | |||
58 | #endif /* __ASM_KVM_BOOK3S_ASM_H__ */ | ||