Lorand Marton <[email protected]> writes: > On Fri, 30 Oct 2026 at 14:10, Alex Bennée <[email protected]> wrote: >> There is a race in qemu_process_cpu_events and sleeping on halt_cond >> where we can miss the setting of the event_register which would cause >> arm_cpu_has_work to report we shouldn't sleep. As by definition the >> bql has to be held when we go to sleep against halt_cond guard the >> kicking of the cpus by the SEV helper with the BQL to ensure things >> are properly serialised. > > I hit this race with a bare-metal test in which two CPUs pass a turn > back and forth 500000 times with WFE and SEV (virt, -smp 2, > semihosting). > > On master (af1179b406) it hangs in 10 of 10 runs with -cpu max and in > 10 of 10 with cortex-a72 (no result after 20 s; a passing run takes > 2 s). A second test, in which a CPU waits in WFE for a broadcast TLBI > and an SEV, hangs in 23 of 100 runs with cortex-a53. > > With this series applied on the same master, the first test passes > 150 of 150 runs (50 each with max, cortex-a72 and cortex-a53) and the > second 600 of 600 (200 each). > > Tested-by: Lorand Marton <[email protected]> > > The series has no test case now; I can post these two as > tests/tcg/aarch64/system tests if that helps.
Are they hand written? I did include the test cases pulled from one of the bugs here: [email protected] but I suspect the violate the current AI policy. > > Thanks, > Lorand -- Alex Bennée Virtualisation Tech Lead @ Linaro
