Lines Matching refs:cntx
19 struct kvm_cpu_context *cntx = &vcpu->arch.guest_context; in kvm_riscv_vcpu_fp_reset() local
21 cntx->sstatus &= ~SR_FS; in kvm_riscv_vcpu_fp_reset()
24 cntx->sstatus |= SR_FS_INITIAL; in kvm_riscv_vcpu_fp_reset()
26 cntx->sstatus |= SR_FS_OFF; in kvm_riscv_vcpu_fp_reset()
29 static void kvm_riscv_vcpu_fp_clean(struct kvm_cpu_context *cntx) in kvm_riscv_vcpu_fp_clean() argument
31 cntx->sstatus &= ~SR_FS; in kvm_riscv_vcpu_fp_clean()
32 cntx->sstatus |= SR_FS_CLEAN; in kvm_riscv_vcpu_fp_clean()
35 void kvm_riscv_vcpu_guest_fp_save(struct kvm_cpu_context *cntx, in kvm_riscv_vcpu_guest_fp_save() argument
38 if ((cntx->sstatus & SR_FS) == SR_FS_DIRTY) { in kvm_riscv_vcpu_guest_fp_save()
40 __kvm_riscv_fp_d_save(cntx); in kvm_riscv_vcpu_guest_fp_save()
42 __kvm_riscv_fp_f_save(cntx); in kvm_riscv_vcpu_guest_fp_save()
43 kvm_riscv_vcpu_fp_clean(cntx); in kvm_riscv_vcpu_guest_fp_save()
47 void kvm_riscv_vcpu_guest_fp_restore(struct kvm_cpu_context *cntx, in kvm_riscv_vcpu_guest_fp_restore() argument
50 if ((cntx->sstatus & SR_FS) != SR_FS_OFF) { in kvm_riscv_vcpu_guest_fp_restore()
52 __kvm_riscv_fp_d_restore(cntx); in kvm_riscv_vcpu_guest_fp_restore()
54 __kvm_riscv_fp_f_restore(cntx); in kvm_riscv_vcpu_guest_fp_restore()
55 kvm_riscv_vcpu_fp_clean(cntx); in kvm_riscv_vcpu_guest_fp_restore()
59 void kvm_riscv_vcpu_host_fp_save(struct kvm_cpu_context *cntx) in kvm_riscv_vcpu_host_fp_save() argument
63 __kvm_riscv_fp_d_save(cntx); in kvm_riscv_vcpu_host_fp_save()
65 __kvm_riscv_fp_f_save(cntx); in kvm_riscv_vcpu_host_fp_save()
68 void kvm_riscv_vcpu_host_fp_restore(struct kvm_cpu_context *cntx) in kvm_riscv_vcpu_host_fp_restore() argument
71 __kvm_riscv_fp_d_restore(cntx); in kvm_riscv_vcpu_host_fp_restore()
73 __kvm_riscv_fp_f_restore(cntx); in kvm_riscv_vcpu_host_fp_restore()
81 struct kvm_cpu_context *cntx = &vcpu->arch.guest_context; in kvm_riscv_vcpu_get_reg_fp() local
94 reg_val = &cntx->fp.f.fcsr; in kvm_riscv_vcpu_get_reg_fp()
97 reg_val = &cntx->fp.f.f[reg_num]; in kvm_riscv_vcpu_get_reg_fp()
105 reg_val = &cntx->fp.d.fcsr; in kvm_riscv_vcpu_get_reg_fp()
110 reg_val = &cntx->fp.d.f[reg_num]; in kvm_riscv_vcpu_get_reg_fp()
126 struct kvm_cpu_context *cntx = &vcpu->arch.guest_context; in kvm_riscv_vcpu_set_reg_fp() local
139 reg_val = &cntx->fp.f.fcsr; in kvm_riscv_vcpu_set_reg_fp()
142 reg_val = &cntx->fp.f.f[reg_num]; in kvm_riscv_vcpu_set_reg_fp()
150 reg_val = &cntx->fp.d.fcsr; in kvm_riscv_vcpu_set_reg_fp()
155 reg_val = &cntx->fp.d.f[reg_num]; in kvm_riscv_vcpu_set_reg_fp()