Home
last modified time | relevance | path

Searched hist:"0 c346576e401d83becb075e70fef207a09afc3e6" (Results 1 – 2 of 2) sorted by relevance

/qemu/target/loongarch/kvm/
H A Dkvm.c0c346576e401d83becb075e70fef207a09afc3e6 Mon Mar 24 12:33:28 UTC 2025 Xianglai Li <lixianglai@loongson.cn> target/loongarch: Fix the cpu unplug resource leak

When the cpu is created, qemu_add_vm_change_state_handler
is called in the kvm_arch_init_vcpu function to create
the VMChangeStateEntry resource.

However, the resource is not released when the cpu is destroyed.
This results in a qemu process segment error when the virtual
machine restarts after the cpu is unplugged.

This patch solves the problem by adding the corresponding resource
release process to the kvm_arch_destroy_vcpu function.

Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-Id: <20250324123328.518076-1-lixianglai@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
/qemu/target/loongarch/
H A Dcpu.h0c346576e401d83becb075e70fef207a09afc3e6 Mon Mar 24 12:33:28 UTC 2025 Xianglai Li <lixianglai@loongson.cn> target/loongarch: Fix the cpu unplug resource leak

When the cpu is created, qemu_add_vm_change_state_handler
is called in the kvm_arch_init_vcpu function to create
the VMChangeStateEntry resource.

However, the resource is not released when the cpu is destroyed.
This results in a qemu process segment error when the virtual
machine restarts after the cpu is unplugged.

This patch solves the problem by adding the corresponding resource
release process to the kvm_arch_destroy_vcpu function.

Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-Id: <20250324123328.518076-1-lixianglai@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>