aboutsummaryrefslogtreecommitdiff
path: root/target/i386/hax/hax-all.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-04-05 09:15:26 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2023-06-28 13:55:35 +0200
commit83d0f7f95cc88bbf31ba000d1d2f05e8563f9d97 (patch)
treeb2a44bf9807c44607e124008803b354ad101310f /target/i386/hax/hax-all.c
parent43477340c38c7980d4f4d5bfedf1bd0146ccb577 (diff)
accel: Destroy HAX vCPU threads once done
When the vCPU thread finished its processing, destroy it and signal its destruction to generic vCPU management layer. Add a sanity check for the vCPU accelerator context. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230624174121.11508-6-philmd@linaro.org>
Diffstat (limited to 'target/i386/hax/hax-all.c')
-rw-r--r--target/i386/hax/hax-all.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/i386/hax/hax-all.c b/target/i386/hax/hax-all.c
index a2321a1eff..38a4323a3c 100644
--- a/target/i386/hax/hax-all.c
+++ b/target/i386/hax/hax-all.c
@@ -209,6 +209,7 @@ int hax_vcpu_destroy(CPUState *cpu)
CloseHandle(cpu->hThread);
#endif
g_free(vcpu);
+ cpu->hax_vcpu = NULL;
return 0;
}