Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Inochi Amaoto" <inochiama@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v3 2/4] RISC-V: KVM: Add SBI FWFT validation support
Date: Wed, 29 Jul 2026 23:52:37 +0000	[thread overview]
Message-ID: <20260729235238.6576A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260729232527.139183-3-inochiama@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] The FWFT SBI extension defaults to enabled, breaking live migration and violating KVM ABI guidelines.
--

--- Patch [2]: [PATCH v3 2/4] RISC-V: KVM: Add SBI FWFT validation support ---
commit 9a4432f98b4fe06897baf4b85a503109a0f2b7f8
Author: Inochi Amaoto <inochiama@gmail.com>

RISC-V: KVM: Add SBI FWFT validation support

This commit implements extension parameters validation support for the KVM
SBI FWFT extension.

> diff --git a/arch/riscv/kvm/vcpu_sbi_fwft.c b/arch/riscv/kvm/vcpu_sbi_fwft.c
> index 1342adb3180c6..2794e9e5b495e 100644
> --- a/arch/riscv/kvm/vcpu_sbi_fwft.c
> +++ b/arch/riscv/kvm/vcpu_sbi_fwft.c

[ ... ]

> @@ -574,6 +598,7 @@ const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_fwft = {
>  	.init = kvm_sbi_ext_fwft_init,
>  	.deinit = kvm_sbi_ext_fwft_deinit,
>  	.reset = kvm_sbi_ext_fwft_reset,
> +	.validate = kvm_sbi_ext_fwft_validate,
[Severity: High]
This isn't a bug introduced by this patch, but does this extension default
to enabled because it lacks the .default_disabled = true flag in this
struct?

If an older userspace creates a VM on a new kernel with the FWFT extension,
the kernel silently exposes this capability to the guest. If the guest uses
this feature and is subsequently live-migrated to an older kernel that
lacks FWFT support, will the migration silently fail when the extension
unexpectedly disappears?

Could we add .default_disabled = true to vcpu_sbi_ext_fwft to ensure proper
capability negotiation?

>  	.state_reg_subtype = KVM_REG_RISCV_SBI_FWFT,
>  	.get_state_reg_count = kvm_sbi_ext_fwft_get_reg_count,
>  	.get_state_reg_id = kvm_sbi_ext_fwft_get_reg_id,

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260729232527.139183-1-inochiama@gmail.com?part=2

  reply	other threads:[~2026-07-29 23:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 23:25 [PATCH v3 0/4] RISC-V: KVM: Cleanup SBI extension status when disable Inochi Amaoto
2026-07-29 23:25 ` [PATCH v3 1/4] RISC-V: KVM: Add SBI extension validate callback Inochi Amaoto
2026-07-29 23:39   ` sashiko-bot
2026-07-29 23:25 ` [PATCH v3 2/4] RISC-V: KVM: Add SBI FWFT validation support Inochi Amaoto
2026-07-29 23:52   ` sashiko-bot [this message]
2026-07-29 23:25 ` [PATCH v3 3/4] RISC-V: KVM: Reset the SBI extension when disable it Inochi Amaoto
2026-07-29 23:25 ` [PATCH v3 4/4] RISC-V: KVM: Mark the reset callback of FWFT extension always dirties CSR Inochi Amaoto
2026-07-29 23:54   ` sashiko-bot

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=20260729235238.6576A1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=inochiama@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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