[PATCH v3 0/5] vCPU hotunplug related memory leaks

Mark Kanda posted 5 patches 2 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220321141409.3112932-1-mark.kanda@oracle.com
Test checkpatch passed
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <r.bolshakov@yadro.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Stefano Stabellini <sstabellini@kernel.org>, Anthony Perard <anthony.perard@citrix.com>, Paul Durrant <paul@xen.org>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Yanan Wang <wangyanan55@huawei.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, Wenchao Wang <wenchao.wang@intel.com>, Colin Xu <colin.xu@intel.com>, Kamil Rytarowski <kamil@netbsd.org>, Reinoud Zandijk <reinoud@netbsd.org>, Sunil Muthuswamy <sunilmut@microsoft.com>
accel/accel-common.c              |  7 +++++++
accel/hvf/hvf-accel-ops.c         | 10 ++++++++++
accel/kvm/kvm-accel-ops.c         | 10 ++++++++++
accel/qtest/qtest.c               |  1 +
accel/tcg/tcg-accel-ops.c         |  1 +
accel/xen/xen-all.c               |  1 +
cpu.c                             |  1 +
include/exec/cpu-common.h         |  7 +++++++
include/sysemu/accel-ops.h        |  3 +++
softmmu/cpus.c                    |  3 +++
softmmu/physmem.c                 |  5 +++++
target/i386/hax/hax-accel-ops.c   |  1 +
target/i386/nvmm/nvmm-accel-ops.c |  1 +
target/i386/whpx/whpx-accel-ops.c |  1 +
14 files changed, 52 insertions(+)
[PATCH v3 0/5] vCPU hotunplug related memory leaks
Posted by Mark Kanda 2 years, 1 month ago
This series addresses a few vCPU hotunplug related leaks (found with Valgrind).

v3:
- patch 4: create cpu_address_space_destroy() to free cpu_ases (Phillipe)
- patch 5: create <kvm, hvf>_destroy_vcpu_thread() to free xsave_buf (Phillipe)

v2: Create AccelOpsClass::destroy_vcpu_thread() for vcpu thread related cleanup
(Philippe)

Mark Kanda (5):
  accel: Introduce AccelOpsClass::destroy_vcpu_thread()
  softmmu/cpus: Free cpu->thread in generic_destroy_vcpu_thread()
  softmmu/cpus: Free cpu->halt_cond in generic_destroy_vcpu_thread()
  cpu: Free cpu->cpu_ases in cpu_address_space_destroy()
  i386/cpu: Free env->xsave_buf in KVM and HVF destory_vcpu_thread
    routines

 accel/accel-common.c              |  7 +++++++
 accel/hvf/hvf-accel-ops.c         | 10 ++++++++++
 accel/kvm/kvm-accel-ops.c         | 10 ++++++++++
 accel/qtest/qtest.c               |  1 +
 accel/tcg/tcg-accel-ops.c         |  1 +
 accel/xen/xen-all.c               |  1 +
 cpu.c                             |  1 +
 include/exec/cpu-common.h         |  7 +++++++
 include/sysemu/accel-ops.h        |  3 +++
 softmmu/cpus.c                    |  3 +++
 softmmu/physmem.c                 |  5 +++++
 target/i386/hax/hax-accel-ops.c   |  1 +
 target/i386/nvmm/nvmm-accel-ops.c |  1 +
 target/i386/whpx/whpx-accel-ops.c |  1 +
 14 files changed, 52 insertions(+)

-- 
2.27.0