]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/powerpc/include/asm/kvm_host.h
KVM: PPC: VFIO: Add in-kernel acceleration for VFIO
[mirror_ubuntu-zesty-kernel.git] / arch / powerpc / include / asm / kvm_host.h
index e59b172666cd31aa35635216d74ecdb21106b0dd..16504232cdb5cb4a1eecd60d252cff8164906ba9 100644 (file)
@@ -191,6 +191,13 @@ struct kvmppc_pginfo {
        atomic_t refcnt;
 };
 
+struct kvmppc_spapr_tce_iommu_table {
+       struct rcu_head rcu;
+       struct list_head next;
+       struct iommu_table *tbl;
+       struct kref kref;
+};
+
 struct kvmppc_spapr_tce_table {
        struct list_head list;
        struct kvm *kvm;
@@ -199,6 +206,7 @@ struct kvmppc_spapr_tce_table {
        u32 page_shift;
        u64 offset;             /* in pages */
        u64 size;               /* window size in pages */
+       struct list_head iommu_tables;
        struct page *pages[0];
 };
 
@@ -263,7 +271,11 @@ struct kvm_arch {
        unsigned long hpt_mask;
        atomic_t hpte_mod_interest;
        cpumask_t need_tlb_flush;
+       cpumask_t cpu_in_guest;
        int hpt_cma_alloc;
+       u8 radix;
+       pgd_t *pgtable;
+       u64 process_table;
        struct dentry *debugfs_dir;
        struct dentry *htab_dentry;
 #endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */
@@ -603,6 +615,7 @@ struct kvm_vcpu_arch {
        ulong fault_dar;
        u32 fault_dsisr;
        unsigned long intr_msr;
+       ulong fault_gpa;        /* guest real address of page fault (POWER9) */
 #endif
 
 #ifdef CONFIG_BOOKE
@@ -657,6 +670,7 @@ struct kvm_vcpu_arch {
        int state;
        int ptid;
        int thread_cpu;
+       int prev_cpu;
        bool timer_running;
        wait_queue_head_t cpu_run;