diff options
Diffstat (limited to 'arch/powerpc/include/asm/kvm_host.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 047855619cc4..7efd666a3fa7 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h | |||
@@ -180,11 +180,6 @@ struct kvmppc_spapr_tce_table { | |||
180 | struct page *pages[0]; | 180 | struct page *pages[0]; |
181 | }; | 181 | }; |
182 | 182 | ||
183 | struct kvm_rma_info { | ||
184 | atomic_t use_count; | ||
185 | unsigned long base_pfn; | ||
186 | }; | ||
187 | |||
188 | /* XICS components, defined in book3s_xics.c */ | 183 | /* XICS components, defined in book3s_xics.c */ |
189 | struct kvmppc_xics; | 184 | struct kvmppc_xics; |
190 | struct kvmppc_icp; | 185 | struct kvmppc_icp; |
@@ -214,16 +209,9 @@ struct revmap_entry { | |||
214 | #define KVMPPC_RMAP_PRESENT 0x100000000ul | 209 | #define KVMPPC_RMAP_PRESENT 0x100000000ul |
215 | #define KVMPPC_RMAP_INDEX 0xfffffffful | 210 | #define KVMPPC_RMAP_INDEX 0xfffffffful |
216 | 211 | ||
217 | /* Low-order bits in memslot->arch.slot_phys[] */ | ||
218 | #define KVMPPC_PAGE_ORDER_MASK 0x1f | ||
219 | #define KVMPPC_PAGE_NO_CACHE HPTE_R_I /* 0x20 */ | ||
220 | #define KVMPPC_PAGE_WRITETHRU HPTE_R_W /* 0x40 */ | ||
221 | #define KVMPPC_GOT_PAGE 0x80 | ||
222 | |||
223 | struct kvm_arch_memory_slot { | 212 | struct kvm_arch_memory_slot { |
224 | #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE | 213 | #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE |
225 | unsigned long *rmap; | 214 | unsigned long *rmap; |
226 | unsigned long *slot_phys; | ||
227 | #endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */ | 215 | #endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */ |
228 | }; | 216 | }; |
229 | 217 | ||
@@ -242,14 +230,12 @@ struct kvm_arch { | |||
242 | struct kvm_rma_info *rma; | 230 | struct kvm_rma_info *rma; |
243 | unsigned long vrma_slb_v; | 231 | unsigned long vrma_slb_v; |
244 | int rma_setup_done; | 232 | int rma_setup_done; |
245 | int using_mmu_notifiers; | ||
246 | u32 hpt_order; | 233 | u32 hpt_order; |
247 | atomic_t vcpus_running; | 234 | atomic_t vcpus_running; |
248 | u32 online_vcores; | 235 | u32 online_vcores; |
249 | unsigned long hpt_npte; | 236 | unsigned long hpt_npte; |
250 | unsigned long hpt_mask; | 237 | unsigned long hpt_mask; |
251 | atomic_t hpte_mod_interest; | 238 | atomic_t hpte_mod_interest; |
252 | spinlock_t slot_phys_lock; | ||
253 | cpumask_t need_tlb_flush; | 239 | cpumask_t need_tlb_flush; |
254 | int hpt_cma_alloc; | 240 | int hpt_cma_alloc; |
255 | #endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */ | 241 | #endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */ |
@@ -297,6 +283,7 @@ struct kvmppc_vcore { | |||
297 | struct list_head runnable_threads; | 283 | struct list_head runnable_threads; |
298 | spinlock_t lock; | 284 | spinlock_t lock; |
299 | wait_queue_head_t wq; | 285 | wait_queue_head_t wq; |
286 | spinlock_t stoltb_lock; /* protects stolen_tb and preempt_tb */ | ||
300 | u64 stolen_tb; | 287 | u64 stolen_tb; |
301 | u64 preempt_tb; | 288 | u64 preempt_tb; |
302 | struct kvm_vcpu *runner; | 289 | struct kvm_vcpu *runner; |
@@ -308,6 +295,7 @@ struct kvmppc_vcore { | |||
308 | ulong dpdes; /* doorbell state (POWER8) */ | 295 | ulong dpdes; /* doorbell state (POWER8) */ |
309 | void *mpp_buffer; /* Micro Partition Prefetch buffer */ | 296 | void *mpp_buffer; /* Micro Partition Prefetch buffer */ |
310 | bool mpp_buffer_is_valid; | 297 | bool mpp_buffer_is_valid; |
298 | ulong conferring_threads; | ||
311 | }; | 299 | }; |
312 | 300 | ||
313 | #define VCORE_ENTRY_COUNT(vc) ((vc)->entry_exit_count & 0xff) | 301 | #define VCORE_ENTRY_COUNT(vc) ((vc)->entry_exit_count & 0xff) |
@@ -664,6 +652,8 @@ struct kvm_vcpu_arch { | |||
664 | spinlock_t tbacct_lock; | 652 | spinlock_t tbacct_lock; |
665 | u64 busy_stolen; | 653 | u64 busy_stolen; |
666 | u64 busy_preempt; | 654 | u64 busy_preempt; |
655 | |||
656 | u32 emul_inst; | ||
667 | #endif | 657 | #endif |
668 | }; | 658 | }; |
669 | 659 | ||