RISC-V: KVM: Improve vector save/restore functions
authorAndrew Jones <ajones@ventanamicro.com>
Fri, 4 Aug 2023 13:56:18 +0000 (16:56 +0300)
committerAnup Patel <anup@brainfault.org>
Tue, 8 Aug 2023 11:56:05 +0000 (17:26 +0530)
commit630b4cee9c378e2dbb56ed84f71fc2fac50b716e
treea630bb101e1ccf955adabdc17fbab9aae9a492cf
parente47f3c2843c2c23467f9447ed977dfccbe13a6f7
RISC-V: KVM: Improve vector save/restore functions

Make two nonfunctional changes to the vector get/set vector reg
functions and their supporting function for simplification and
readability. The first is to not pass KVM_REG_RISCV_VECTOR, but
rather integrate it directly into the masking. The second is to
rename reg_val to reg_addr where and address is used instead of
a value.

Also opportunistically touch up some of the code formatting for
a third nonfunctional change.

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/kvm_vcpu_vector.h
arch/riscv/kvm/vcpu_onereg.c
arch/riscv/kvm/vcpu_vector.c