KVM: Reinstate gfn_to_pfn_cache with invalidation support
[linux-2.6-microblaze.git] / include / linux / kvm_types.h
index 888ef12..dceac12 100644 (file)
@@ -19,6 +19,7 @@ struct kvm_memslots;
 enum kvm_mr_change;
 
 #include <linux/types.h>
+#include <linux/spinlock_types.h>
 
 #include <asm/kvm_types.h>
 
@@ -53,6 +54,23 @@ struct gfn_to_hva_cache {
        struct kvm_memory_slot *memslot;
 };
 
+struct gfn_to_pfn_cache {
+       u64 generation;
+       gpa_t gpa;
+       unsigned long uhva;
+       struct kvm_memory_slot *memslot;
+       struct kvm_vcpu *vcpu;
+       struct list_head list;
+       rwlock_t lock;
+       void *khva;
+       kvm_pfn_t pfn;
+       bool active;
+       bool valid;
+       bool dirty;
+       bool kernel_map;
+       bool guest_uses_pa;
+};
+
 #ifdef KVM_ARCH_NR_OBJS_PER_MEMORY_CACHE
 /*
  * Memory caches are used to preallocate memory ahead of various MMU flows,