From a5547f92f2190d59bf0d8528c79b5f98b9880465 Mon Sep 17 00:00:00 2001 From: Xianglai Li Date: Thu, 6 Mar 2025 17:01:27 +0800 Subject: [PATCH] Repair CPU hotplug object repeated release problem Under loongarch architecture, the cpu object is repeatedly released when the cpu is unplugged. Now delete the code that repeatedly releases the cpu object. Signed-off-by: Xianglai Li --- ...plug-object-repeated-release-problem.patch | 29 +++++++++++++++++++ qemu-kvm.spec | 6 +++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 Repair-CPU-hotplug-object-repeated-release-problem.patch diff --git a/Repair-CPU-hotplug-object-repeated-release-problem.patch b/Repair-CPU-hotplug-object-repeated-release-problem.patch new file mode 100644 index 0000000..ad8f6f3 --- /dev/null +++ b/Repair-CPU-hotplug-object-repeated-release-problem.patch @@ -0,0 +1,29 @@ +From f46d987090956cdebf56355c9cab8b2ce526b291 Mon Sep 17 00:00:00 2001 +From: Xianglai Li +Date: Thu, 6 Mar 2025 16:47:30 +0800 +Subject: [PATCH] Repair CPU hotplug object repeated release problem + +Under loongarch architecture, the cpu object is repeatedly +released when the cpu is unplugged. Now delete the code +that repeatedly releases the cpu object. + +Signed-off-by: Xianglai Li +--- + hw/loongarch/larch_hotplug.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/hw/loongarch/larch_hotplug.c b/hw/loongarch/larch_hotplug.c +index bb3e9826b..a9e0e32bf 100644 +--- a/hw/loongarch/larch_hotplug.c ++++ b/hw/loongarch/larch_hotplug.c +@@ -112,7 +112,6 @@ static void loongarch_cpu_unplug(HotplugHandler *hotplug_dev, + + found_cpu = loongarch_find_cpu_slot(MACHINE(lsms), cpu->id, NULL); + found_cpu->cpu = NULL; +- object_unparent(OBJECT(dev)); + lsms->hotpluged_cpu_num -= 1; + out: + error_propagate(errp, local_err); +-- +2.43.5 + diff --git a/qemu-kvm.spec b/qemu-kvm.spec index 42a3950..aa59254 100644 --- a/qemu-kvm.spec +++ b/qemu-kvm.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.6 +%define anolis_release .0.7 %global SLOF_gittagdate 20191022 %global SLOF_gittagcommit 899d9883 @@ -1044,6 +1044,7 @@ Patch1135: 1135-bugfix-hw-vfio-hct-fix-ccp-index-error-caused-by-uni.patch Patch1136: 1136-newfeature-hw-vfio-hct-sharing-CCP-resources-between.patch Patch1137: 1137-bugfix-hw-vfio-hct-exit-once-mdev-deivce-realize-fai.patch Patch1138: 1138-bugfix-hw-vfio-hct-build-hct-device-in-default.patch +Patch1139: Repair-CPU-hotplug-object-repeated-release-problem.patch BuildRequires: wget BuildRequires: rpm-build @@ -2282,6 +2283,9 @@ sh %{_sysconfdir}/sysconfig/modules/kvm.modules &> /dev/null || : %endif %changelog +* Thu Mar 6 2025 Xianglai Li - 6.2.0-53.0.1.7 +- Repair-CPU-hotplug-object-repeated-release-problem.patch + * Fri Feb 14 2025 yangdepei - 6.2.0-53.0.1.6 - support Hygon CCP used in guest - 1133-newfeature-hw-vfio-add-hct-device-based-mediated-use.patch -- Gitee