[PATCH 09/60] kvm: Introduce struct kvm_plane
Liam Merwick
liam.merwick at oracle.com
Thu Nov 26 09:48:46 PST 2026
On 08/06/2026 15:42, Jörg Rödel wrote:
> From: Paolo Bonzini <pbonzini at redhat.com>
>
> 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 at redhat.com>
> Co-developed-by: Joerg Roedel <joerg.roedel at amd.com>
> Signed-off-by: Joerg Roedel <joerg.roedel at amd.com>
> ---
> 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
More information about the kvm-riscv
mailing list