Re: [PATCH 1/5] RISC-V: KVM: Lazy enable hstateen IMSIC & ISEL bit
From: Radim Krčmář
Date: Thu May 08 2025 - 09:31:26 EST
2025-05-05T14:39:26-07:00, Atish Patra <atishp@xxxxxxxxxxxx>:
> Currently, we enable the smstateen bit at vcpu configure time by
> only checking the presence of required ISA extensions.
>
> These bits are not required to be enabled if the guest never uses
> the corresponding architectural state. Enable the smstaeen bits
> at runtime lazily upon first access.
What is the advantage of enabling them lazily?
To make the trap useful, we would have to lazily perform initialization
of the AIA. I think it would require notable changes to AIA, though...
Thanks.