On 29/08/2025 14.59, Paolo Bonzini wrote:
From: Igor Mammedov <[email protected]>
The helpers form load-acquire/store-release pair and ensure
that appropriate barriers are in place in case checks happen
outside of BQL.
Use them to replace open-coded checkers/setters across the code,
to make sure that barriers are not missed. Helpers also make code a
bit more readable.
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Reviewed-by: Jason J. Herne <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
...
diff --git a/target/rx/helper.c b/target/rx/helper.c
index 0640ab322b5..ce003af4219 100644
--- a/target/rx/helper.c
+++ b/target/rx/helper.c
@@ -44,7 +44,7 @@ void rx_cpu_unpack_psw(CPURXState *env, uint32_t psw, int rte)
void rx_cpu_do_interrupt(CPUState *cs)
{
CPURXState *env = cpu_env(cs);
- int do_irq = cs->interrupt_request & INT_FLAGS;
+ int do_irq = cpu_test_interrupt(cs, INT_FLAGS);
uint32_t save_psw;
Hi Igor,
this patch breaks the test_linux_sash test from
tests/functional/rx/test_gdbsim.py. cpu_test_interrupt() only returns a
bool, but that code in target/rx/helper.c checks the individual INT_* bits
in the do_irq variable, so this cannot work. Could you please have a look?
Thanks,
Thomas