From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: Jan Beulich <jbeulich@suse.com>,
Baptiste Le Duc <baptiste.le-duc@vates.tech>
Cc: xen-devel@lists.xenproject.org,
"Alistair Francis" <alistair.francis@wdc.com>,
"Connor Davis" <connojdavis@gmail.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger@xenproject.org>,
"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: [PATCH v2 4/6] xen/riscv: make Zihintpause no longer a required extension
Date: Tue, 22 Sep 2026 16:26:38 +0200 [thread overview]
Message-ID: <66104177-def7-419e-b6c6-55c3cbc04ddc@gmail.com> (raw)
In-Reply-To: <20c2003f-910b-4e9b-92f4-5298f11f58df@suse.com>
On 9/22/26 2:27 PM, Jan Beulich wrote:
> On 10.09.2026 11:34, Baptiste Le Duc wrote:
>> required_extensions[] panics at boot if Zihintpause is missing, but Xen
>> never actually depends on it: cpu_relax() only emits the "pause" hint when
>> the extension is implemented, otherwise it emits `0x0100000F`, a legally
>> valid FENCE instruction (`FENCE W, 0`) rather than a native NOP.
>
> Just that PAUSE's encoding is 0x0100000F. I.e. what is emitted is always
> the same, and hence discussing the encoding aspect here doesn't help
> justify the change. NOP or not also doesn't really matter here. The
> specific hint encoding looks to fall into what prior to Zihintpause would
> have been covered by "Designated for future standard use", and hence ...
>
>> FENCE is
>> guaranteed by the RISC-V base ISA, so it never raises an illegal
>> instruction fault. With an empty successor set, it enforces no
>> memory-ordering constraints and thus architecturally behaves as a NOP.
>
> ... there indeed should be no concern for any platform playing by the
> rules.
>
>> Drop it from required_extensions so hardware without Zihintpause
>> still boots.
>>
>> Assisted-by: Claude:claude-opus-5
>> Signed-off-by: Baptiste Le Duc <baptiste.le-duc@vates.tech>
>> ---
>> Changes since v1:
>> - rewrite commit message.
>
> I fear another round of re-writing is going to be necessary, sorry.
Would it be better:
required_extensions[] panics at boot if Zihintpause is missing, but Xen
does not strictly require hardware support for it.
The PAUSE hint (Zihintpause extension) is encoded as FENCE W, 0
(0x0100000F). In accordance with the RISC-V Unprivileged ISA, HINTs are
encoded in the space of valid standard instructions. On platforms
without Zihintpause support, executing 0x0100000F is treated as a
standard FENCE with an empty successor set, which acts as a NOP and
never generates an illegal instruction trap.
Therefore, Zihintpause is purely an optimization hint. Drop it from
required_extensions[] so systems without explicit Zihintpause support
can boot Xen successfully.
?
~ Oleksii
next prev parent reply other threads:[~2026-09-22 14:26 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 9:30 [PATCH v2 0/6] xen/riscv: fix boot on missing extensions and MMU setup bugs Baptiste Le Duc
2026-09-10 9:34 ` [PATCH v2 1/6] xen/riscv: fix Svade/Svadu A/D bit handling Baptiste Le Duc
2026-09-21 15:26 ` Jan Beulich
2026-09-21 17:03 ` Baptiste Le Duc
2026-09-22 6:24 ` Jan Beulich
2026-09-22 9:17 ` Baptiste Le Duc
2026-09-22 15:14 ` Oleksii Kurochko
2026-09-22 15:18 ` Baptiste Le Duc
2026-09-23 7:31 ` Oleksii Kurochko
2026-09-22 15:29 ` Oleksii Kurochko
2026-09-23 10:06 ` Baptiste Le Duc
2026-09-23 10:41 ` Oleksii Kurochko
2026-09-10 9:34 ` [PATCH v2 2/6] xen/riscv: set A/D bits in Xen's page-table mappings under Svade Baptiste Le Duc
2026-09-16 8:54 ` Zhang Zheng
2026-09-21 15:35 ` Jan Beulich
2026-09-22 15:05 ` Oleksii Kurochko
2026-09-10 9:34 ` [PATCH v2 3/6] xen/riscv: make Svpbmt no longer a required extension Baptiste Le Duc
2026-09-21 15:57 ` Jan Beulich
2026-09-22 14:38 ` Oleksii Kurochko
2026-09-28 13:21 ` Baptiste Le Duc
2026-09-22 14:48 ` Oleksii Kurochko
2026-09-10 9:34 ` [PATCH v2 4/6] xen/riscv: make Zihintpause " Baptiste Le Duc
2026-09-22 12:27 ` Jan Beulich
2026-09-22 14:26 ` Oleksii Kurochko [this message]
2026-09-22 15:10 ` Jan Beulich
2026-09-22 14:50 ` Oleksii Kurochko
2026-09-10 9:34 ` [PATCH v2 5/6] xen/riscv: flush speculatively cached Bare-mode TLB entries in turn_on_mmu() Baptiste Le Duc
2026-09-22 12:31 ` Jan Beulich
2026-09-22 14:21 ` Oleksii Kurochko
2026-09-10 9:34 ` [PATCH v2 6/6] xen/riscv: fix level_map_mask truncation on load_start Baptiste Le Duc
2026-09-16 8:54 ` Zhang Zheng
2026-09-22 12:43 ` Jan Beulich
2026-09-22 14:21 ` Oleksii Kurochko
2026-09-10 9:47 ` [PATCH v2 0/6] xen/riscv: fix boot on missing extensions and MMU setup bugs Jan Beulich
2026-09-10 9:56 ` Baptiste Le Duc
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=66104177-def7-419e-b6c6-55c3cbc04ddc@gmail.com \
--to=oleksii.kurochko@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=baptiste.le-duc@vates.tech \
--cc=connojdavis@gmail.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger@xenproject.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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.