Move kvm headers from kvm/kernel to kvm/include
[qemu-kvm/fedora.git] / kvm / include / powerpc / asm / kvm_asm.h
blob84ff858ee7ab4b2f104c67dc2925e470e877c3dd
1 #ifndef KVM_UNIFDEF_H
2 #define KVM_UNIFDEF_H
4 #ifdef __i386__
5 #ifndef CONFIG_X86_32
6 #define CONFIG_X86_32 1
7 #endif
8 #endif
10 #ifdef __x86_64__
11 #ifndef CONFIG_X86_64
12 #define CONFIG_X86_64 1
13 #endif
14 #endif
16 #if defined(__i386__) || defined (__x86_64__)
17 #ifndef CONFIG_X86
18 #define CONFIG_X86 1
19 #endif
20 #endif
22 #ifdef __ia64__
23 #ifndef CONFIG_IA64
24 #define CONFIG_IA64 1
25 #endif
26 #endif
28 #ifdef __PPC__
29 #ifndef CONFIG_PPC
30 #define CONFIG_PPC 1
31 #endif
32 #endif
34 #ifdef __s390__
35 #ifndef CONFIG_S390
36 #define CONFIG_S390 1
37 #endif
38 #endif
40 #endif
42 * This program is free software; you can redistribute it and/or modify
43 * it under the terms of the GNU General Public License, version 2, as
44 * published by the Free Software Foundation.
46 * This program is distributed in the hope that it will be useful,
47 * but WITHOUT ANY WARRANTY; without even the implied warranty of
48 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49 * GNU General Public License for more details.
51 * You should have received a copy of the GNU General Public License
52 * along with this program; if not, write to the Free Software
53 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
55 * Copyright IBM Corp. 2008
57 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
60 #ifndef __POWERPC_KVM_ASM_H__
61 #define __POWERPC_KVM_ASM_H__
63 /* IVPR must be 64KiB-aligned. */
64 #define VCPU_SIZE_ORDER 4
65 #define VCPU_SIZE_LOG (VCPU_SIZE_ORDER + 12)
66 #define VCPU_TLB_PGSZ PPC44x_TLB_64K
67 #define VCPU_SIZE_BYTES (1<<VCPU_SIZE_LOG)
69 #define BOOKE_INTERRUPT_CRITICAL 0
70 #define BOOKE_INTERRUPT_MACHINE_CHECK 1
71 #define BOOKE_INTERRUPT_DATA_STORAGE 2
72 #define BOOKE_INTERRUPT_INST_STORAGE 3
73 #define BOOKE_INTERRUPT_EXTERNAL 4
74 #define BOOKE_INTERRUPT_ALIGNMENT 5
75 #define BOOKE_INTERRUPT_PROGRAM 6
76 #define BOOKE_INTERRUPT_FP_UNAVAIL 7
77 #define BOOKE_INTERRUPT_SYSCALL 8
78 #define BOOKE_INTERRUPT_AP_UNAVAIL 9
79 #define BOOKE_INTERRUPT_DECREMENTER 10
80 #define BOOKE_INTERRUPT_FIT 11
81 #define BOOKE_INTERRUPT_WATCHDOG 12
82 #define BOOKE_INTERRUPT_DTLB_MISS 13
83 #define BOOKE_INTERRUPT_ITLB_MISS 14
84 #define BOOKE_INTERRUPT_DEBUG 15
86 /* E500 */
87 #define BOOKE_INTERRUPT_SPE_UNAVAIL 32
88 #define BOOKE_INTERRUPT_SPE_FP_DATA 33
89 #define BOOKE_INTERRUPT_SPE_FP_ROUND 34
90 #define BOOKE_INTERRUPT_PERFORMANCE_MONITOR 35
92 #define RESUME_FLAG_NV (1<<0) /* Reload guest nonvolatile state? */
93 #define RESUME_FLAG_HOST (1<<1) /* Resume host? */
95 #define RESUME_GUEST 0
96 #define RESUME_GUEST_NV RESUME_FLAG_NV
97 #define RESUME_HOST RESUME_FLAG_HOST
98 #define RESUME_HOST_NV (RESUME_FLAG_HOST|RESUME_FLAG_NV)
100 #endif /* __POWERPC_KVM_ASM_H__ */