drm/panthor: Don't add write fences to the shared BOs
[drm/drm-misc.git] / arch / riscv / include / asm / kvm_vcpu_fp.h
blobb5540147409fcdcdf3f4924d5ae99fd5738c68fb
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2021 Western Digital Corporation or its affiliates.
5 * Authors:
6 * Atish Patra <atish.patra@wdc.com>
7 * Anup Patel <anup.patel@wdc.com>
8 */
10 #ifndef __KVM_VCPU_RISCV_FP_H
11 #define __KVM_VCPU_RISCV_FP_H
13 #include <linux/types.h>
15 struct kvm_cpu_context;
17 #ifdef CONFIG_FPU
18 void __kvm_riscv_fp_f_save(struct kvm_cpu_context *context);
19 void __kvm_riscv_fp_f_restore(struct kvm_cpu_context *context);
20 void __kvm_riscv_fp_d_save(struct kvm_cpu_context *context);
21 void __kvm_riscv_fp_d_restore(struct kvm_cpu_context *context);
23 void kvm_riscv_vcpu_fp_reset(struct kvm_vcpu *vcpu);
24 void kvm_riscv_vcpu_guest_fp_save(struct kvm_cpu_context *cntx,
25 const unsigned long *isa);
26 void kvm_riscv_vcpu_guest_fp_restore(struct kvm_cpu_context *cntx,
27 const unsigned long *isa);
28 void kvm_riscv_vcpu_host_fp_save(struct kvm_cpu_context *cntx);
29 void kvm_riscv_vcpu_host_fp_restore(struct kvm_cpu_context *cntx);
30 #else
31 static inline void kvm_riscv_vcpu_fp_reset(struct kvm_vcpu *vcpu)
34 static inline void kvm_riscv_vcpu_guest_fp_save(struct kvm_cpu_context *cntx,
35 const unsigned long *isa)
38 static inline void kvm_riscv_vcpu_guest_fp_restore(
39 struct kvm_cpu_context *cntx,
40 const unsigned long *isa)
43 static inline void kvm_riscv_vcpu_host_fp_save(struct kvm_cpu_context *cntx)
46 static inline void kvm_riscv_vcpu_host_fp_restore(
47 struct kvm_cpu_context *cntx)
50 #endif
52 int kvm_riscv_vcpu_get_reg_fp(struct kvm_vcpu *vcpu,
53 const struct kvm_one_reg *reg,
54 unsigned long rtype);
55 int kvm_riscv_vcpu_set_reg_fp(struct kvm_vcpu *vcpu,
56 const struct kvm_one_reg *reg,
57 unsigned long rtype);
59 #endif