|
32 | 32 | #include <linux/atomic.h> |
33 | 33 | #include <asm/kvm_asm.h> |
34 | 34 | #include <asm/processor.h> |
| 35 | +#include <asm/page.h> |
35 | 36 |
|
36 | 37 | #define KVM_MAX_VCPUS NR_CPUS |
37 | 38 | #define KVM_MAX_VCORES NR_CPUS |
|
44 | 45 | #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 |
45 | 46 | #endif |
46 | 47 |
|
| 48 | +#ifdef CONFIG_KVM_BOOK3S_64_HV |
| 49 | +#include <linux/mmu_notifier.h> |
| 50 | + |
| 51 | +#define KVM_ARCH_WANT_MMU_NOTIFIER |
| 52 | + |
| 53 | +struct kvm; |
| 54 | +extern int kvm_unmap_hva(struct kvm *kvm, unsigned long hva); |
| 55 | +extern int kvm_age_hva(struct kvm *kvm, unsigned long hva); |
| 56 | +extern int kvm_test_age_hva(struct kvm *kvm, unsigned long hva); |
| 57 | +extern void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte); |
| 58 | + |
| 59 | +#endif |
| 60 | + |
47 | 61 | /* We don't currently support large pages. */ |
48 | 62 | #define KVM_HPAGE_GFN_SHIFT(x) 0 |
49 | 63 | #define KVM_NR_PAGE_SIZES 1 |
@@ -212,6 +226,7 @@ struct kvm_arch { |
212 | 226 | struct kvmppc_rma_info *rma; |
213 | 227 | unsigned long vrma_slb_v; |
214 | 228 | int rma_setup_done; |
| 229 | + int using_mmu_notifiers; |
215 | 230 | struct list_head spapr_tce_tables; |
216 | 231 | spinlock_t slot_phys_lock; |
217 | 232 | unsigned long *slot_phys[KVM_MEM_SLOTS_NUM]; |
@@ -460,6 +475,7 @@ struct kvm_vcpu_arch { |
460 | 475 | struct list_head run_list; |
461 | 476 | struct task_struct *run_task; |
462 | 477 | struct kvm_run *kvm_run; |
| 478 | + pgd_t *pgdir; |
463 | 479 | #endif |
464 | 480 | }; |
465 | 481 |
|
|
0 commit comments