Re: [PATCH 09/60] kvm: Introduce struct kvm_plane
From: Liam Merwick
Date: Thu Nov 26 2026 - 12:49:34 EST
On 08/06/2026 15:42, Jörg Rödel wrote:
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
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 <pbonzini@xxxxxxxxxx>
Co-developed-by: Joerg Roedel <joerg.roedel@xxxxxxx>
Signed-off-by: Joerg Roedel <joerg.roedel@xxxxxxx>
---
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