Lines Matching refs:cntx
56 struct kvm_cpu_context *cntx = &vcpu->arch.guest_context; in kvm_riscv_reset_vcpu() local
74 memcpy(cntx, reset_cntx, sizeof(*cntx)); in kvm_riscv_reset_vcpu()
100 struct kvm_cpu_context *cntx; in kvm_arch_vcpu_create() local
114 cntx = &vcpu->arch.guest_reset_context; in kvm_arch_vcpu_create()
115 cntx->sstatus = SR_SPP | SR_SPIE; in kvm_arch_vcpu_create()
116 cntx->hstatus = 0; in kvm_arch_vcpu_create()
117 cntx->hstatus |= HSTATUS_VTW; in kvm_arch_vcpu_create()
118 cntx->hstatus |= HSTATUS_SPVP; in kvm_arch_vcpu_create()
119 cntx->hstatus |= HSTATUS_SPV; in kvm_arch_vcpu_create()
252 struct kvm_cpu_context *cntx = &vcpu->arch.guest_context; in kvm_riscv_vcpu_get_reg_core() local
266 reg_val = cntx->sepc; in kvm_riscv_vcpu_get_reg_core()
269 reg_val = ((unsigned long *)cntx)[reg_num]; in kvm_riscv_vcpu_get_reg_core()
271 reg_val = (cntx->sstatus & SR_SPP) ? in kvm_riscv_vcpu_get_reg_core()
285 struct kvm_cpu_context *cntx = &vcpu->arch.guest_context; in kvm_riscv_vcpu_set_reg_core() local
302 cntx->sepc = reg_val; in kvm_riscv_vcpu_set_reg_core()
305 ((unsigned long *)cntx)[reg_num] = reg_val; in kvm_riscv_vcpu_set_reg_core()
308 cntx->sstatus |= SR_SPP; in kvm_riscv_vcpu_set_reg_core()
310 cntx->sstatus &= ~SR_SPP; in kvm_riscv_vcpu_set_reg_core()