qemu/target/i386
Philippe Mathieu-Daudé dcebbb65b8 target/i386/kvm: Free xsave_buf when destroying vCPU
Fix vCPU hot-unplug related leak reported by Valgrind:

  ==132362== 4,096 bytes in 1 blocks are definitely lost in loss record 8,440 of 8,549
  ==132362==    at 0x4C3B15F: memalign (vg_replace_malloc.c:1265)
  ==132362==    by 0x4C3B288: posix_memalign (vg_replace_malloc.c:1429)
  ==132362==    by 0xB41195: qemu_try_memalign (memalign.c:53)
  ==132362==    by 0xB41204: qemu_memalign (memalign.c:73)
  ==132362==    by 0x7131CB: kvm_init_xsave (kvm.c:1601)
  ==132362==    by 0x7148ED: kvm_arch_init_vcpu (kvm.c:2031)
  ==132362==    by 0x91D224: kvm_init_vcpu (kvm-all.c:516)
  ==132362==    by 0x9242C9: kvm_vcpu_thread_fn (kvm-accel-ops.c:40)
  ==132362==    by 0xB2EB26: qemu_thread_start (qemu-thread-posix.c:556)
  ==132362==    by 0x7EB2159: start_thread (in /usr/lib64/libpthread-2.28.so)
  ==132362==    by 0x9D45DD2: clone (in /usr/lib64/libc-2.28.so)

Reported-by: Mark Kanda <mark.kanda@oracle.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Mark Kanda <mark.kanda@oracle.com>
Message-Id: <20220322120522.26200-1-philippe.mathieu.daude@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-23 12:22:25 +01:00
..
hax Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
hvf hvf: Remove deprecated hv_vcpu_flush() calls 2022-03-15 13:36:33 +01:00
kvm target/i386/kvm: Free xsave_buf when destroying vCPU 2022-03-23 12:22:25 +01:00
nvmm Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
tcg target/i386: Throw a #SS when loading a non-canonical IST 2022-03-15 11:50:15 +01:00
whpx Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
arch_dump.c
arch_memory_mapping.c
cpu-dump.c monitor: Trim some trailing space from human-readable output 2021-10-31 21:05:40 +01:00
cpu-internal.h i386: split off sysemu part of cpu.c 2021-05-10 15:41:52 -04:00
cpu-param.h
cpu-qom.h target: Introduce and use OBJECT_DECLARE_CPU_TYPE() macro 2022-03-06 22:23:09 +01:00
cpu-sysemu.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
cpu.c KVM: SVM: always set MSR_AMD64_TSC_RATIO to default value 2022-03-15 11:50:50 +01:00
cpu.h x86: Support XFD and AMX xsave data migration 2022-03-15 11:50:50 +01:00
gdbstub.c target/i386: gdbstub: only write CR0/CR2/CR3/EFER for sysemu 2021-05-10 15:41:52 -04:00
helper.c * Improve virtio-net failover test 2022-02-22 13:07:32 +00:00
helper.h target/i386: Drop check for singlestep_enabled 2021-10-15 16:39:14 -07:00
host-cpu.c i386: do not call cpudef-only models functions for max, host, base 2021-07-23 15:47:13 +02:00
host-cpu.h accel-cpu: make cpu_realizefn return a bool 2021-05-10 15:41:50 -04:00
Kconfig meson: Introduce target-specific Kconfig 2021-07-09 18:21:34 +02:00
machine.c x86: Support XFD and AMX xsave data migration 2022-03-15 11:50:50 +01:00
meson.build target/i386/sev: Remove stubs by using code elision 2021-10-13 10:47:49 +02:00
monitor.c monitor: remove 'info ioapic' HMP command 2021-11-02 15:55:13 +00:00
ops_sse_header.h tcg: Remove dh_alias indirection for dh_typecode 2022-02-28 08:04:06 -10:00
ops_sse.h
sev-sysemu-stub.c monitor: Reduce hmp_info_sev() declaration 2021-10-13 10:47:49 +02:00
sev.c target/i386/sev: Replace qemu_map_ram_ptr with address_space_map 2021-11-18 13:28:32 +00:00
sev.h target/i386/sev: Move qmp_query_sev() & hmp_info_sev() to sev.c 2021-10-13 10:47:49 +02:00
shift_helper_template.h
svm.h target/i386: Added vVMLOAD and vVMSAVE feature 2021-09-13 13:56:26 +02:00
trace-events * Update the references to some doc files (use *.rst instead of *.txt) 2021-06-02 17:08:11 +01:00
trace.h
xsave_helper.c x86: add support for KVM_CAP_XSAVE2 and AMX state migration 2022-03-15 11:50:50 +01:00