On 08/06/2026 15:42, Jörg Rödel wrote:
From: Paolo Bonzini <[email protected]>

Introduce a data structure to keep VM-wide per-plane state. Initialize
the structure with a back-pointer to struct kvm and the plane level
the structure represents.

Signed-off-by: Paolo Bonzini <[email protected]>
Co-developed-by: Joerg Roedel <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
---
  include/linux/kvm_host.h |  7 +++++++
  include/uapi/linux/kvm.h |  6 ++++++
  virt/kvm/kvm_main.c      | 41 ++++++++++++++++++++++++++++++++++++++++
  3 files changed, 54 insertions(+)


(...)
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c

(...)

@@ -1304,6 +1344,7 @@ static void kvm_destroy_vm(struct kvm *kvm)
        xa_destroy(&kvm->mem_attr_array);
  #endif
        kvm_arch_free_vm(kvm);
+       kvm_destroy_planes(kvm);

This needs to be called before kvm_arch_free_vm() which frees kvm.

        preempt_notifier_dec();
        kvm_disable_virtualization();
        mmdrop(mm);

Regards,
Liam


Reply via email to