aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-07-01 15:08:32 +0100
committerPeter Maydell <peter.maydell@linaro.org>2025-07-01 15:08:32 +0100
commit30484a6635161e8bd62014542c5fd15bbf14834f (patch)
tree2d9fc1fa4e17f30cb4eb9f8e42300040d8826154
parenta74b63b3a4451bec2f0d77fc101cf066d1e0fdb1 (diff)
downloadqemu-30484a6635161e8bd62014542c5fd15bbf14834f.zip
qemu-30484a6635161e8bd62014542c5fd15bbf14834f.tar.gz
qemu-30484a6635161e8bd62014542c5fd15bbf14834f.tar.bz2
target/arm/hvf: Directly re-lock BQL after hv_vcpu_run()
Keep bql_unlock() / bql_lock() close. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-id: 20250623121845.7214-6-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target/arm/hvf/hvf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index 5c95ccc..3c234f7 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -1915,7 +1915,9 @@ int hvf_vcpu_exec(CPUState *cpu)
flush_cpu_state(cpu);
bql_unlock();
- assert_hvf_ok(hv_vcpu_run(cpu->accel->fd));
+ r = hv_vcpu_run(cpu->accel->fd);
+ bql_lock();
+ assert_hvf_ok(r);
/* handle VMEXIT */
uint64_t exit_reason = hvf_exit->reason;
@@ -1923,7 +1925,6 @@ int hvf_vcpu_exec(CPUState *cpu)
uint32_t ec = syn_get_ec(syndrome);
ret = 0;
- bql_lock();
switch (exit_reason) {
case HV_EXIT_REASON_EXCEPTION:
/* This is the main one, handle below. */