From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Eric Auger <eric.auger@redhat.com>,
eric.auger.pro@gmail.com, richard.henderson@linaro.org,
peter.maydell@linaro.org, pbonzini@redhat.com,
qemu-devel@nongnu.org
Cc: iii@linux.ibm.com
Subject: Re: [PATCH] accel/tcg: test CPUJumpCache in tb_jmp_cache_clear_page()
Date: Fri, 3 Feb 2023 18:21:11 +0100 [thread overview]
Message-ID: <c7f8a9b3-fa05-10e7-bc1f-ad7cbefdc431@linaro.org> (raw)
In-Reply-To: <20230203171510.2867451-1-eric.auger@redhat.com>
On 3/2/23 18:15, Eric Auger wrote:
> After commit 4e4fa6c12d ("accel/tcg: Complete cpu initialization
> before registration"), it looks the CPUJumpCache handle can be NULL.
> This causes a SIGSEV when running debug-wp-migration kvm unit test.
Do you mean commit a976a99a29 ("include/hw/core: Create struct
CPUJumpCache") instead?
> At the first place it should be clarified why this TCG code is called
> with KVM acceleration. This may hide another bug.
>
> Fixes: 4e4fa6c12d ("accel/tcg: Complete cpu initialization before registration")
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> ---
> accel/tcg/cputlb.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
> index 4e040a1cb9..ac0245ee6c 100644
> --- a/accel/tcg/cputlb.c
> +++ b/accel/tcg/cputlb.c
> @@ -103,6 +103,10 @@ static void tb_jmp_cache_clear_page(CPUState *cpu, target_ulong page_addr)
> int i, i0 = tb_jmp_cache_hash_page(page_addr);
> CPUJumpCache *jc = cpu->tb_jmp_cache;
>
> + if (!jc) {
unlikely()?
> + return;
> + }
> +
> for (i = 0; i < TB_JMP_PAGE_SIZE; i++) {
> qatomic_set(&jc->array[i0 + i].tb, NULL);
> }
next prev parent reply other threads:[~2023-02-03 17:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 17:15 [PATCH] accel/tcg: test CPUJumpCache in tb_jmp_cache_clear_page() Eric Auger
2023-02-03 17:21 ` Philippe Mathieu-Daudé [this message]
2023-02-03 17:24 ` Eric Auger
2023-02-03 21:29 ` Richard Henderson
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=c7f8a9b3-fa05-10e7-bc1f-ad7cbefdc431@linaro.org \
--to=philmd@linaro.org \
--cc=eric.auger.pro@gmail.com \
--cc=eric.auger@redhat.com \
--cc=iii@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).