diff options
Diffstat (limited to 'arch/powerpc/include/asm/kvm_host.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index b0b23c007d6e..bba3b9b72a39 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/kvm_types.h> | 27 | #include <linux/kvm_types.h> |
28 | #include <linux/kvm_para.h> | ||
28 | #include <asm/kvm_asm.h> | 29 | #include <asm/kvm_asm.h> |
29 | 30 | ||
30 | #define KVM_MAX_VCPUS 1 | 31 | #define KVM_MAX_VCPUS 1 |
@@ -41,12 +42,17 @@ | |||
41 | 42 | ||
42 | #define HPTEG_CACHE_NUM (1 << 15) | 43 | #define HPTEG_CACHE_NUM (1 << 15) |
43 | #define HPTEG_HASH_BITS_PTE 13 | 44 | #define HPTEG_HASH_BITS_PTE 13 |
45 | #define HPTEG_HASH_BITS_PTE_LONG 12 | ||
44 | #define HPTEG_HASH_BITS_VPTE 13 | 46 | #define HPTEG_HASH_BITS_VPTE 13 |
45 | #define HPTEG_HASH_BITS_VPTE_LONG 5 | 47 | #define HPTEG_HASH_BITS_VPTE_LONG 5 |
46 | #define HPTEG_HASH_NUM_PTE (1 << HPTEG_HASH_BITS_PTE) | 48 | #define HPTEG_HASH_NUM_PTE (1 << HPTEG_HASH_BITS_PTE) |
49 | #define HPTEG_HASH_NUM_PTE_LONG (1 << HPTEG_HASH_BITS_PTE_LONG) | ||
47 | #define HPTEG_HASH_NUM_VPTE (1 << HPTEG_HASH_BITS_VPTE) | 50 | #define HPTEG_HASH_NUM_VPTE (1 << HPTEG_HASH_BITS_VPTE) |
48 | #define HPTEG_HASH_NUM_VPTE_LONG (1 << HPTEG_HASH_BITS_VPTE_LONG) | 51 | #define HPTEG_HASH_NUM_VPTE_LONG (1 << HPTEG_HASH_BITS_VPTE_LONG) |
49 | 52 | ||
53 | /* Physical Address Mask - allowed range of real mode RAM access */ | ||
54 | #define KVM_PAM 0x0fffffffffffffffULL | ||
55 | |||
50 | struct kvm; | 56 | struct kvm; |
51 | struct kvm_run; | 57 | struct kvm_run; |
52 | struct kvm_vcpu; | 58 | struct kvm_vcpu; |
@@ -159,8 +165,10 @@ struct kvmppc_mmu { | |||
159 | 165 | ||
160 | struct hpte_cache { | 166 | struct hpte_cache { |
161 | struct hlist_node list_pte; | 167 | struct hlist_node list_pte; |
168 | struct hlist_node list_pte_long; | ||
162 | struct hlist_node list_vpte; | 169 | struct hlist_node list_vpte; |
163 | struct hlist_node list_vpte_long; | 170 | struct hlist_node list_vpte_long; |
171 | struct rcu_head rcu_head; | ||
164 | u64 host_va; | 172 | u64 host_va; |
165 | u64 pfn; | 173 | u64 pfn; |
166 | ulong slot; | 174 | ulong slot; |
@@ -210,28 +218,20 @@ struct kvm_vcpu_arch { | |||
210 | u32 cr; | 218 | u32 cr; |
211 | #endif | 219 | #endif |
212 | 220 | ||
213 | ulong msr; | ||
214 | #ifdef CONFIG_PPC_BOOK3S | 221 | #ifdef CONFIG_PPC_BOOK3S |
215 | ulong shadow_msr; | 222 | ulong shadow_msr; |
216 | ulong hflags; | 223 | ulong hflags; |
217 | ulong guest_owned_ext; | 224 | ulong guest_owned_ext; |
218 | #endif | 225 | #endif |
219 | u32 mmucr; | 226 | u32 mmucr; |
220 | ulong sprg0; | ||
221 | ulong sprg1; | ||
222 | ulong sprg2; | ||
223 | ulong sprg3; | ||
224 | ulong sprg4; | 227 | ulong sprg4; |
225 | ulong sprg5; | 228 | ulong sprg5; |
226 | ulong sprg6; | 229 | ulong sprg6; |
227 | ulong sprg7; | 230 | ulong sprg7; |
228 | ulong srr0; | ||
229 | ulong srr1; | ||
230 | ulong csrr0; | 231 | ulong csrr0; |
231 | ulong csrr1; | 232 | ulong csrr1; |
232 | ulong dsrr0; | 233 | ulong dsrr0; |
233 | ulong dsrr1; | 234 | ulong dsrr1; |
234 | ulong dear; | ||
235 | ulong esr; | 235 | ulong esr; |
236 | u32 dec; | 236 | u32 dec; |
237 | u32 decar; | 237 | u32 decar; |
@@ -290,12 +290,17 @@ struct kvm_vcpu_arch { | |||
290 | struct tasklet_struct tasklet; | 290 | struct tasklet_struct tasklet; |
291 | u64 dec_jiffies; | 291 | u64 dec_jiffies; |
292 | unsigned long pending_exceptions; | 292 | unsigned long pending_exceptions; |
293 | struct kvm_vcpu_arch_shared *shared; | ||
294 | unsigned long magic_page_pa; /* phys addr to map the magic page to */ | ||
295 | unsigned long magic_page_ea; /* effect. addr to map the magic page to */ | ||
293 | 296 | ||
294 | #ifdef CONFIG_PPC_BOOK3S | 297 | #ifdef CONFIG_PPC_BOOK3S |
295 | struct hlist_head hpte_hash_pte[HPTEG_HASH_NUM_PTE]; | 298 | struct hlist_head hpte_hash_pte[HPTEG_HASH_NUM_PTE]; |
299 | struct hlist_head hpte_hash_pte_long[HPTEG_HASH_NUM_PTE_LONG]; | ||
296 | struct hlist_head hpte_hash_vpte[HPTEG_HASH_NUM_VPTE]; | 300 | struct hlist_head hpte_hash_vpte[HPTEG_HASH_NUM_VPTE]; |
297 | struct hlist_head hpte_hash_vpte_long[HPTEG_HASH_NUM_VPTE_LONG]; | 301 | struct hlist_head hpte_hash_vpte_long[HPTEG_HASH_NUM_VPTE_LONG]; |
298 | int hpte_cache_count; | 302 | int hpte_cache_count; |
303 | spinlock_t mmu_lock; | ||
299 | #endif | 304 | #endif |
300 | }; | 305 | }; |
301 | 306 | ||