]> git.proxmox.com Git - mirror_qemu.git/commitdiff
accel: Introduce accel_cpu_common_unrealize() stub
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 3 Oct 2023 12:30:22 +0000 (14:30 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 3 Oct 2023 15:00:25 +0000 (08:00 -0700)
Prepare the stub for parity with accel_cpu_common_realize().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20231003123026.99229-5-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/accel-common.c
cpu.c
include/qemu/accel.h

index 53cf08a89a0599ae4c0e7cfb40cf0bb50b5714c3..e9548eac29daaf7bfe0972f6762ea15105697054 100644 (file)
@@ -129,6 +129,10 @@ bool accel_cpu_common_realize(CPUState *cpu, Error **errp)
     return true;
 }
 
+void accel_cpu_common_unrealize(CPUState *cpu)
+{
+}
+
 int accel_supported_gdbstub_sstep_flags(void)
 {
     AccelState *accel = current_accel();
diff --git a/cpu.c b/cpu.c
index 1e2649a7064ee782be29e20eb9af9e12dc59b614..2a1eff948b4e3142029f9a15d4a115ddece0062b 100644 (file)
--- a/cpu.c
+++ b/cpu.c
@@ -187,8 +187,10 @@ void cpu_exec_unrealizefn(CPUState *cpu)
     cpu_list_remove(cpu);
     /*
      * Now that the vCPU has been removed from the RCU list, we can call
-     * tcg_exec_unrealizefn, which may free fields using call_rcu.
+     * tcg_exec_unrealizefn and
+     * accel_cpu_common_unrealize, which may free fields using call_rcu.
      */
+    accel_cpu_common_unrealize(cpu);
     if (tcg_enabled()) {
         tcg_exec_unrealizefn(cpu);
     }
index 898159c001b0b4150d6e71b0be7c49aeef56a959..446153b1457baac53f026df7edacdb23a6c50559 100644 (file)
@@ -96,6 +96,12 @@ void accel_cpu_instance_init(CPUState *cpu);
  */
 bool accel_cpu_common_realize(CPUState *cpu, Error **errp);
 
+/**
+ * accel_cpu_common_unrealize:
+ * @cpu: The CPU that needs to call accel-specific cpu unrealization.
+ */
+void accel_cpu_common_unrealize(CPUState *cpu);
+
 /**
  * accel_supported_gdbstub_sstep_flags:
  *