From: Andrew Jones <ajones@ventanamicro.com>
To: Yao Zihong <zihong.plct@isrc.iscas.ac.cn>
Cc: alex@ghiti.fr, alexghiti@rivosinc.com, aou@eecs.berkeley.edu,
cleger@rivosinc.com, evan@rivosinc.com,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
palmer@dabbelt.com, pjw@kernel.org, samuel.holland@sifive.com,
shuah@kernel.org, zhangyin2018@iscas.ac.cn,
zihongyao@outlook.com
Subject: Re: [PATCH v3 2/2] selftests/riscv: Add Zicbop prefetch test
Date: Thu, 30 Oct 2025 16:16:35 -0500 [thread overview]
Message-ID: <20251030-3c0cafb066281de4dacd4000@orel> (raw)
In-Reply-To: <20251023154841.36007-1-zihong.plct@isrc.iscas.ac.cn>
On Thu, Oct 23, 2025 at 11:48:18PM +0800, Yao Zihong wrote:
> > Undesired reformatting
> My bad. It will be fixed in the next version.
>
> > Should we just unconditionally register handlers for SIGSEGV and SIGBUS?
> I think it depends on what the flags --sig{segv,ill,bus} are intended to mean:
>
> a) We intend to handle these faults that might be raised inside the test
> (i.e., catch and convert them into pass/fail results without crashing the
> test binary, rather than letting something else handle them externally).
> b) We expect these signals to be raised as part of the test scenario and
> handle them within the test program accordingly.
>
> I'm not sure if (a) is appropriate, since it might mess up someone’s CI
> or other automation setups.
The intention of --sigill is to tell the test that a SIGILL is expected
and tests should be run to ensure they are raised. We should probably
allow that expectation to be extension specific though, i.e. have both a
--zicbom-raises-sigill and a --zicboz-raises-sigill
>
> If we’re going with (b), then registering handlers for SIGSEGV and SIGBUS
> based on flags would be inconsistent with that semantics, since prefetch.*
> should never legitimately raise them. In that case, this design probably
> doesn’t make sense. Would it also make sense to rename the '--sigill' flag
> to make this clearer?
Since SIGSEGV and SIGBUS are never expected, then we could always handle
those in order to report failures, but we should narrow the time the
handlers are registered to be just around the use of instructions under
test.
Thanks,
drew
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2025-10-30 21:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 15:29 [PATCH v3 0/2] riscv: hwprobe: Add Zicbop support Yao Zihong
2025-10-20 15:33 ` [PATCH v3 1/2] riscv: hwprobe: Expose Zicbop extension and its block size Yao Zihong
2025-10-21 23:21 ` Andrew Jones
2025-10-20 15:37 ` [PATCH v3 2/2] selftests/riscv: Add Zicbop prefetch test Yao Zihong
2025-10-21 23:32 ` Andrew Jones
2025-10-23 15:48 ` Yao Zihong
2025-10-30 21:16 ` Andrew Jones [this message]
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=20251030-3c0cafb066281de4dacd4000@orel \
--to=ajones@ventanamicro.com \
--cc=alex@ghiti.fr \
--cc=alexghiti@rivosinc.com \
--cc=aou@eecs.berkeley.edu \
--cc=cleger@rivosinc.com \
--cc=evan@rivosinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=samuel.holland@sifive.com \
--cc=shuah@kernel.org \
--cc=zhangyin2018@iscas.ac.cn \
--cc=zihong.plct@isrc.iscas.ac.cn \
--cc=zihongyao@outlook.com \
/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