]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RISC-V: KVM: Save/restore SCOUNTEREN in C source
authorAnup Patel <apatel@ventanamicro.com>
Sun, 20 Oct 2024 19:47:24 +0000 (01:17 +0530)
committerAnup Patel <anup@brainfault.org>
Mon, 28 Oct 2024 11:13:43 +0000 (16:43 +0530)
commitb922307a5fecfcf33ca1697f6ec33c9274b75c46
treeb17428c31d078752e415d01b5b75250e1cbbbda5
parentb6114a7e2433e91fedee3ed983abf77b3ebc167c
RISC-V: KVM: Save/restore SCOUNTEREN in C source

The SCOUNTEREN CSR need not be saved/restored in the low-level
__kvm_riscv_switch_to() function hence move the SCOUNTEREN CSR
save/restore to the kvm_riscv_vcpu_swap_in_guest_state() and
kvm_riscv_vcpu_swap_in_host_state() functions in C sources.

Also, re-arrange the CSR save/restore and related GPR usage in
the low-level __kvm_riscv_switch_to() low-level function.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20241020194734.58686-4-apatel@ventanamicro.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu.c
arch/riscv/kvm/vcpu_switch.S