]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: KVM: FP lazy save/restore
authorAtish Patra <atish.patra@wdc.com>
Mon, 27 Sep 2021 11:40:12 +0000 (17:10 +0530)
committerAnup Patel <anup@brainfault.org>
Mon, 4 Oct 2021 10:38:23 +0000 (16:08 +0530)
commit4c53754bd2607a7e389aa7c692b83a89169b546c
tree2e5e161bb93e0cecc740a8029a4d186ddb71ad27
parent0e6db97d49d32d7abacf3dd9657d543808dc2645
RISC-V: KVM: FP lazy save/restore

This patch adds floating point (F and D extension) context save/restore
for guest VCPUs. The FP context is saved and restored lazily only when
kernel enter/exits the in-kernel run loop and not during the KVM world
switch. This way FP save/restore has minimal impact on KVM performance.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alexander Graf <graf@amazon.com>
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/kvm_host.h
arch/riscv/kernel/asm-offsets.c
arch/riscv/kvm/vcpu.c
arch/riscv/kvm/vcpu_switch.S