Re: [PATCH v3 4/4] RISC-V: KVM: Mark the reset callback of FWFT extension always dirties CSR
Anup Patel <[email protected]> Thu, 30 Jul 2026 12:06:18 +0530
| Newsgroups | org.infradead.lists.linux-riscv,org.infradead.lists.kvm-riscv,org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAAhSdy3mzKDCy1zEpB7K7qJHG_mUThUu_bXwD+n+RjONPvtS3w@mail.gmail.com> |
On Thu, Jul 30, 2026 at 4:55 AM Inochi Amaoto <[email protected]> wrote: > > As the CSR is only flushed when the csr_dirty is set, always set the > csr_dirty field in kvm_sbi_ext_fwft_reset() so the CSR change can take > effect immediately. This unconditional set should be safe as all > supported FWFT features change the CSR state currently. > > Signed-off-by: Inochi Amaoto <[email protected]> LGTM. Reviewed-by: Anup Patel <[email protected]> Thanks, Anup > --- > arch/riscv/kvm/vcpu_sbi_fwft.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/riscv/kvm/vcpu_sbi_fwft.c b/arch/riscv/kvm/vcpu_sbi_fwft.c > index 56fb59afe02a..2e35e7e12327 100644 > --- a/arch/riscv/kvm/vcpu_sbi_fwft.c > +++ b/arch/riscv/kvm/vcpu_sbi_fwft.c > @@ -601,6 +601,8 @@ static void kvm_sbi_ext_fwft_reset(struct kvm_vcpu *vcpu) > if (feature->reset) > feature->reset(vcpu); > } > + > + vcpu->arch.csr_dirty = true; > } > > static void kvm_sbi_ext_fwft_validate(struct kvm_vcpu *vcpu) > -- > 2.55.0 > _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv