All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Lorand Marton <lorandmarton.dev@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-stable@nongnu.org
Subject: Re: [PATCH 1/4] target/arm: hold bql when SEV sets the event_register
Date: Sun, 01 Nov 2026 17:55:29 +0000	[thread overview]
Message-ID: <87ik2g77xq.fsf@draig.linaro.org> (raw)
In-Reply-To: <20261101172901.873975-1-lorandmarton.dev@gmail.com> (Lorand Marton's message of "Sun, 1 Nov 2026 18:29:01 +0100")

Lorand Marton <lorandmarton.dev@gmail.com> writes:

> On Fri, 30 Oct 2026 at 14:10, Alex Bennée <alex.bennee@linaro.org> 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 <lorandmarton.dev@gmail.com>
>
> 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:

  20261029161310.2065290-1-alex.bennee@linaro.org

but I suspect the violate the current AI policy.

>
> Thanks,
> Lorand

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2026-11-01 17:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 14:10 [PATCH 0/4] arm fixes (WxFT, bcm2835_fb) Alex Bennée
2026-10-30 14:10 ` [PATCH 1/4] target/arm: hold bql when SEV sets the event_register Alex Bennée
2026-11-01 17:29   ` Lorand Marton
2026-11-01 17:55     ` Alex Bennée [this message]
2026-10-30 14:10 ` [PATCH 2/4] target/arm: don't pass env to the sev helper Alex Bennée
2026-10-30 14:10 ` [PATCH 3/4] target/arm: simplify wfxt_timer_cb to only trigger cpu_interrupt Alex Bennée
2026-10-30 14:41   ` Peter Maydell
2026-10-30 16:43     ` Alex Bennée
2026-10-30 14:10 ` [PATCH 4/4] target/arm: fix bcm2835 migration issue Alex Bennée
2026-11-02 11:41 ` [PATCH 0/4] arm fixes (WxFT, bcm2835_fb) Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ik2g77xq.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=lorandmarton.dev@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@oss.qualcomm.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.