Merge branch kvm-arm64/ffa-proxy into kvmarm/next
[linux-block.git] / arch / arm64 / include / asm / kvm_host.h
index 396e68cced9e77a9d01f1060ec8441ed064ecaec..6fcc552b40b59e84c3855fb5bd3b2edce50e29aa 100644 (file)
@@ -159,6 +159,21 @@ struct kvm_s2_mmu {
        /* The last vcpu id that ran on each physical CPU */
        int __percpu *last_vcpu_ran;
 
+#define KVM_ARM_EAGER_SPLIT_CHUNK_SIZE_DEFAULT 0
+       /*
+        * Memory cache used to split
+        * KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE worth of huge pages. It
+        * is used to allocate stage2 page tables while splitting huge
+        * pages. The choice of KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE
+        * influences both the capacity of the split page cache, and
+        * how often KVM reschedules. Be wary of raising CHUNK_SIZE
+        * too high.
+        *
+        * Protected by kvm->slots_lock.
+        */
+       struct kvm_mmu_memory_cache split_page_cache;
+       uint64_t split_page_chunk_size;
+
        struct kvm_arch *arch;
 };