From: Rob Bradford <rbradford@rivosinc.com>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Cc: qemu-riscv@nongnu.org
Subject: Vendor CPU overrides of non-extension properties
Date: Fri, 15 Dec 2023 11:49:40 +0000 [thread overview]
Message-ID: <b815ab5fdf33d9b9000c8165d50d000f387a3463.camel@rivosinc.com> (raw)
Hi Daniel,
Thanks for your work on improving the extension handling for vendor
CPUs. I have a query regarding the correct way to override properties
that are included in the "cpu_options" list as part of the vendor CPU
initialisation function.
i.e. these properties:
Property riscv_cpu_options[] = {
DEFINE_PROP_UINT32("pmu-mask", RISCVCPU, cfg.pmu_mask,
MAKE_64BIT_MASK(3, 16)),
{.name = "pmu-num", .info = &prop_pmu_num}, /* Deprecated */
DEFINE_PROP_BOOL("mmu", RISCVCPU, cfg.mmu, true),
DEFINE_PROP_BOOL("pmp", RISCVCPU, cfg.pmp, true),
DEFINE_PROP_STRING("priv_spec", RISCVCPU, cfg.priv_spec),
DEFINE_PROP_STRING("vext_spec", RISCVCPU, cfg.vext_spec),
DEFINE_PROP_UINT16("vlen", RISCVCPU, cfg.vlen, 128),
DEFINE_PROP_UINT16("elen", RISCVCPU, cfg.elen, 64),
DEFINE_PROP_UINT16("cbom_blocksize", RISCVCPU, cfg.cbom_blocksize,
64),
DEFINE_PROP_UINT16("cboz_blocksize", RISCVCPU, cfg.cboz_blocksize,
64),
DEFINE_PROP_END_OF_LIST(),
};
I think that these values should be specifiable as part of the vendor
CPU initialisation method however unfortunately they are overwritten
with the default values from the properties as
riscv_cpu_add_user_properties which adds the properties is called from
the type post_init method which is called after the vendor CPU init
function - so any changes to e.g. cfg.vlen are lost.
I would appreciate hearing your thoughts on how these configuration
values can be set for vendor CPUs.
Cheers,
Rob
next reply other threads:[~2023-12-15 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 11:49 Rob Bradford [this message]
2023-12-15 13:28 ` Vendor CPU overrides of non-extension properties Daniel Henrique Barboza
2023-12-21 18:21 ` Daniel Henrique Barboza
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=b815ab5fdf33d9b9000c8165d50d000f387a3463.camel@rivosinc.com \
--to=rbradford@rivosinc.com \
--cc=dbarboza@ventanamicro.com \
--cc=qemu-riscv@nongnu.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).