summary refs log tree commit diff stats
path: root/include/hw/core/cpu.h
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2024-07-14 19:46:52 +0900
committerPaolo Bonzini <pbonzini@redhat.com>2024-07-16 12:47:44 +0200
commitf8b64d35a625e49ee73f7d54ae80cb5503be975b (patch)
treead2138351f1447c88a9f071f6b51be11bf1474da /include/hw/core/cpu.h
parente0bf95443ee9326d44031373420cf9f3513ee255 (diff)
downloadfocaccia-qemu-f8b64d35a625e49ee73f7d54ae80cb5503be975b.tar.gz
focaccia-qemu-f8b64d35a625e49ee73f7d54ae80cb5503be975b.zip
cpu: Free queued CPU work
Running qemu-system-aarch64 -M virt -nographic and terminating it will
result in a LeakSanitizer error due to remaining queued CPU work so
free it.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Link: https://lore.kernel.org/r/20240714-cpu-v1-1-19c2f8de2055@daynix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw/core/cpu.h')
-rw-r--r--include/hw/core/cpu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index a2c8536943..8e6466c1dd 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -1001,6 +1001,12 @@ void cpu_resume(CPUState *cpu);
 void cpu_remove_sync(CPUState *cpu);
 
 /**
+ * free_queued_cpu_work() - free all items on CPU work queue
+ * @cpu: The CPU which work queue to free.
+ */
+void free_queued_cpu_work(CPUState *cpu);
+
+/**
  * process_queued_cpu_work() - process all items on CPU work queue
  * @cpu: The CPU which work queue to process.
  */