2026-01-20T13:29:54+05:30, Anup Patel <[email protected]>:
> The VCPU config deals with hideleg, hedeleg, henvcfg, and hstateenX
> CSR configuration for each VCPU. Factor-out VCPU config into separate
> sources so that VCPU config can do things differently for guest HS-mode
> and guest VS/VU-mode.
>
> Signed-off-by: Anup Patel <[email protected]>
> ---
> diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c
> @@ -871,7 +820,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)
>       struct kvm_run *run = vcpu->run;
>  
>       if (!vcpu->arch.ran_atleast_once)
> -             kvm_riscv_vcpu_setup_config(vcpu);
> +             kvm_riscv_vcpu_config_ran_once(vcpu);
>  
>       /* Mark this VCPU ran at least once */
>       vcpu->arch.ran_atleast_once = true;
> diff --git a/arch/riscv/kvm/vcpu_config.c b/arch/riscv/kvm/vcpu_config.c
> +void kvm_riscv_vcpu_config_ran_once(struct kvm_vcpu *vcpu)

ran_once is a bit awkward name since it hasn't ran once...
Maybe _once or _first_run?  Not that it matters,

Reviewed-by: Radim Krčmář <[email protected]>

Reply via email to