public inbox for opensbi@lists.infradead.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <radim.krcmar@oss.qualcomm.com>
To: "Andrew Jones" <andrew.jones@oss.qualcomm.com>
Cc: <opensbi@lists.infradead.org>,
	"Anup Patel" <anup.patel@oss.qualcomm.com>,
	"Atish Patra" <atish.patra@linux.dev>,
	"Daniel Henrique Barboza" <daniel.barboza@oss.qualcomm.com>,
	"Sunil V L" <sunilvl@oss.qualcomm.com>,
	"opensbi" <opensbi-bounces@lists.infradead.org>
Subject: Re: [PATCH] lib: sbi: Fix hw a/d updating defaults
Date: Thu, 02 Apr 2026 20:33:24 +0200	[thread overview]
Message-ID: <DHIVUYXFU25U.LR66V59ZX5VH@oss.qualcomm.com> (raw)
In-Reply-To: <wtpswj3mvxnnfxbabm4vm74yl344bu7rixkjevcqomn6zp373b@4n54jk7mh6xu>

2026-04-02T11:24:20-05:00, Andrew Jones <andrew.jones@oss.qualcomm.com>:
> On Thu, Apr 02, 2026 at 04:56:43PM +0200, Radim Krčmář wrote:
>> 2026-04-01T17:08:45-05:00, Andrew Jones <andrew.jones@oss.qualcomm.com>:
>> > The Svade dt-binding description states that Svadu should only
>> > be enabled at boot time when only Svadu is present in the DT.
>> > Ensure that's the case. Also, when only Svadu is supported,
>> > disable FWFT.PTE_AD_HW_UPDATING, as we need both to support
>> > toggling.
>> 
>> Does Svadu without Svade mean that both menvcfg.ADUE or henvcfg.ADUE are
>> read-only 1 (the ISA is vague enough to permit this), or is it just an
>> awkward way to configure the default, so HS mode must assume that
>> henvcfg.ADUE=0 will be Svade?
>
> I couldn't find anything in the spec that explicitly states the ADUE bit
> will behave has read-only one when only Svadu is supported. If the spec
> at least claimed that the ADUE field was WARL then we might infer that,
> but it doesn't even say that.

Yeah, it was a long shot and Greg just clarified in an unrelated thread
that the values are read-write unless explicitly stated otherwise, so
Svadu implies Svade, and we're misusing the extension string to express
a default configuration parameter.

>> Svade is mandatory in RVA profiles, so the corner-case case it not
>> anything I expect to see...
>
> Yes, I expect if Svadu-only harts are built that they likely will make
> ADUE read-only 1, so I don't expect to see problems with just
> unconditionally setting the bit to 1, as we do here (and should set
> henvcfg.ADUE in KVM as well).

Right, we'd only have an issue if software assumed that Svadu without
Svade means that it doesn't have to set the bit to 1 to avoid Svade.

-- 
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

      reply	other threads:[~2026-04-02 18:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01 22:08 [PATCH] lib: sbi: Fix hw a/d updating defaults Andrew Jones
2026-04-02 14:56 ` Radim Krčmář
2026-04-02 16:24   ` Andrew Jones
2026-04-02 18:33     ` Radim Krčmář [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=DHIVUYXFU25U.LR66V59ZX5VH@oss.qualcomm.com \
    --to=radim.krcmar@oss.qualcomm.com \
    --cc=andrew.jones@oss.qualcomm.com \
    --cc=anup.patel@oss.qualcomm.com \
    --cc=atish.patra@linux.dev \
    --cc=daniel.barboza@oss.qualcomm.com \
    --cc=opensbi-bounces@lists.infradead.org \
    --cc=opensbi@lists.infradead.org \
    --cc=sunilvl@oss.qualcomm.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