From: Conor Dooley <conor.dooley@microchip.com>
To: Andrew Jones <ajones@ventanamicro.com>
Cc: Conor Dooley <conor@kernel.org>,
<linux-riscv@lists.infradead.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Heiko Stuebner <heiko@sntech.de>,
Anup Patel <apatel@ventanamicro.com>,
Atish Patra <atishp@rivosinc.com>
Subject: Re: [PATCH 3/3] RISC-V: Ensure Zicbom has a valid block size
Date: Mon, 24 Oct 2022 10:26:36 +0100 [thread overview]
Message-ID: <Y1ZaTHGXCoLrSH5I@wendy> (raw)
In-Reply-To: <20221024083522.fgwej6saqhbvumfj@kamzik>
On Mon, Oct 24, 2022 at 10:35:22AM +0200, Andrew Jones wrote:
> On Mon, Oct 24, 2022 at 09:17:50AM +0100, Conor Dooley wrote:
> > My initial thought here was along the lines of "why care about the
> > issues when it's not enabled", but I went to get some caffeine before
> > replying and had a change of heart.
> > IMO, it'd be good to tell people that their DT doesn't describe their
> > hardware properly when it's gone wrong in a way that we cannot really
> > spot via dtbs_check etc. I'll go away and have a think about whether
> > the DT checks can force cbom-block-size if zicbom is in the isa string,
> > but I'm not sure if that sort of conditional is checkable.
> > If either of these error cases are hit (regardless of whether you set
> > CONFIG_RISCV_ISA_ZICBOM) then it'd cause issues for KVM right? That
> > would imply printing unconditionally to me.
>
> Yes and no. KVM won't have any issues as it won't see Zicbom in the ISA
> bitmap and therefore won't consider offering it to guests. However, it
> could have offered it to guests, if only the DT was fixed, so I agree,
> it's best to unconditionally complain when we see something wrong.
Yeah, that's pretty much what I was getting at. By "KVM having issues" I
meant that without disabling Zicbom, as your patch does, KVM would carry
on & offer Zicbom with the "bad" cbom block size to guests. Following
that line of thought, we'd then want to disable Zicbom & complain no
matter the state of the kconfig symbol so that there'd be info there for
the folks running a non-Zicbom kernel but trying to use Zicbom in their
guest.
>
> > The level at which to
> > actually emit that is beyond the scope of what I care about though ;)
>
> This stackoverflow.com thread indicates I should use 'error'.
> https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
Yeah, on the basis of that thread error does seem appropriate.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
prev parent reply other threads:[~2022-10-24 9:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 10:59 [PATCH 0/3] RISC-V: Ensure Zicbom has a valid block size Andrew Jones
2022-10-21 10:59 ` [PATCH 1/3] RISC-V: Improve use of isa2hwcap[] Andrew Jones
2022-10-23 19:28 ` Conor Dooley
2022-10-24 6:48 ` Andrew Jones
2022-10-24 7:16 ` Conor Dooley
2022-10-21 10:59 ` [PATCH 2/3] RISC-V: Introduce riscv_isa_extension_check Andrew Jones
2022-10-23 19:32 ` Conor Dooley
2022-10-21 10:59 ` [PATCH 3/3] RISC-V: Ensure Zicbom has a valid block size Andrew Jones
2022-10-23 19:38 ` Conor Dooley
2022-10-24 7:09 ` Andrew Jones
2022-10-24 8:17 ` Conor Dooley
2022-10-24 8:35 ` Andrew Jones
2022-10-24 9:26 ` Conor Dooley [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=Y1ZaTHGXCoLrSH5I@wendy \
--to=conor.dooley@microchip.com \
--cc=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=apatel@ventanamicro.com \
--cc=atishp@rivosinc.com \
--cc=conor@kernel.org \
--cc=heiko@sntech.de \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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