]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit5de52d4a23ad3346c3cb24aae728ef6642d1a92e
tree2e5e161bb93e0cecc740a8029a4d186ddb71ad27
parent3a9f66cb25e18a3eeca36c08d9f823a35b3ddc22
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