From: Andrew Jones <ajones@ventanamicro.com>
To: Andrea Bolognani <abologna@redhat.com>
Cc: Alistair Francis <alistair23@gmail.com>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
alistair.francis@wdc.com, bmeng@tinylab.org,
liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com,
palmer@rivosinc.com
Subject: Re: [PATCH v3 3/3] target/riscv/kvm: add missing KVM CSRs
Date: Thu, 20 Mar 2025 15:41:17 +0100 [thread overview]
Message-ID: <20250320-3cb60e99a0abb54e2bb56838@orel> (raw)
In-Reply-To: <CABJz62OfUDHYkQ0T3rGHStQprf1c7_E0qBLbLKhfv=+jb0SYAw@mail.gmail.com>
On Thu, Mar 20, 2025 at 07:25:07AM -0700, Andrea Bolognani wrote:
> On Mon, Mar 03, 2025 at 01:46:53PM +1000, Alistair Francis wrote:
> > On Mon, Feb 24, 2025 at 10:32 PM Daniel Henrique Barboza <dbarboza@ventanamicro.com> wrote:
> > > We're missing scounteren and senvcfg CSRs, both already present in the
> > > KVM UAPI.
> > >
> > > Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
> > > Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
> >
> > Acked-by: Alistair Francis <alistair.francis@wdc.com>
>
> This patch seems to have broken KVM acceleration for me:
>
> $ ./build/qemu-system-riscv64 -display none -M virt,accel=kvm -cpu host
> qemu-system-riscv64: Failed to put registers after init: No such
> file or directory
>
> Reverting it makes QEMU work again.
>
> My host is a SiFive HiFive Premier P550 board running Fedora 41. Note
> that, since the upstreaming effort for this SoC has just recently
> started, I'm using the 6.6-based vendor kernel.
Ancient :-)
>
> Perhaps the KVM UAPI additions mentioned in the commit message are
> more recent than that, and we need to make QEMU's use of them
> conditional rather than unconditional?
scounteren has been around since the dawn of riscv kvm, but senvcfg has
only been there since 6.7 (just missed your ancient cut-off).
The true fix for this is to start using get-reg-list, which should
hopefully work with the 6.6 kernel too since get-reg-list support has
been around since 6.6.
A quick fix for this is to just drop senvcfg for now since nobody
noticed it was missing before (well, I noticed it was missing, but by
inspection, not test).
Thanks,
drew
next prev parent reply other threads:[~2025-03-20 14:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 12:31 [PATCH v3 0/3] target/riscv/kvm: reset time changes Daniel Henrique Barboza
2025-02-24 12:31 ` [PATCH v3 1/3] target/riscv/cpu: remove unneeded !kvm_enabled() check Daniel Henrique Barboza
2025-03-03 3:43 ` Alistair Francis
2025-02-24 12:31 ` [PATCH v3 2/3] target/riscv/kvm: add kvm_riscv_reset_regs_csr() Daniel Henrique Barboza
2025-03-03 3:45 ` Alistair Francis
2025-02-24 12:31 ` [PATCH v3 3/3] target/riscv/kvm: add missing KVM CSRs Daniel Henrique Barboza
2025-03-03 3:46 ` Alistair Francis
2025-03-20 14:25 ` Andrea Bolognani
2025-03-20 14:38 ` Daniel Henrique Barboza
2025-03-20 14:41 ` Andrew Jones [this message]
2025-03-20 14:44 ` Daniel Henrique Barboza
2025-03-03 5:21 ` [PATCH v3 0/3] target/riscv/kvm: reset time changes Alistair Francis
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=20250320-3cb60e99a0abb54e2bb56838@orel \
--to=ajones@ventanamicro.com \
--cc=abologna@redhat.com \
--cc=alistair.francis@wdc.com \
--cc=alistair23@gmail.com \
--cc=bmeng@tinylab.org \
--cc=dbarboza@ventanamicro.com \
--cc=liwei1518@gmail.com \
--cc=palmer@rivosinc.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=zhiwei_liu@linux.alibaba.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;
as well as URLs for NNTP newsgroup(s).