Lines Matching refs:cntx
114 struct kvm_cpu_context *cntx = &vcpu->arch.guest_context; in kvm_riscv_reset_vcpu() local
132 memcpy(cntx, reset_cntx, sizeof(*cntx)); in kvm_riscv_reset_vcpu()
160 struct kvm_cpu_context *cntx; in kvm_arch_vcpu_create() local
186 cntx = &vcpu->arch.guest_reset_context; in kvm_arch_vcpu_create()
187 cntx->sstatus = SR_SPP | SR_SPIE; in kvm_arch_vcpu_create()
188 cntx->hstatus = 0; in kvm_arch_vcpu_create()
189 cntx->hstatus |= HSTATUS_VTW; in kvm_arch_vcpu_create()
190 cntx->hstatus |= HSTATUS_SPVP; in kvm_arch_vcpu_create()
191 cntx->hstatus |= HSTATUS_SPV; in kvm_arch_vcpu_create()
385 struct kvm_cpu_context *cntx = &vcpu->arch.guest_context; in kvm_riscv_vcpu_get_reg_core() local
399 reg_val = cntx->sepc; in kvm_riscv_vcpu_get_reg_core()
402 reg_val = ((unsigned long *)cntx)[reg_num]; in kvm_riscv_vcpu_get_reg_core()
404 reg_val = (cntx->sstatus & SR_SPP) ? in kvm_riscv_vcpu_get_reg_core()
418 struct kvm_cpu_context *cntx = &vcpu->arch.guest_context; in kvm_riscv_vcpu_set_reg_core() local
435 cntx->sepc = reg_val; in kvm_riscv_vcpu_set_reg_core()
438 ((unsigned long *)cntx)[reg_num] = reg_val; in kvm_riscv_vcpu_set_reg_core()
441 cntx->sstatus |= SR_SPP; in kvm_riscv_vcpu_set_reg_core()
443 cntx->sstatus &= ~SR_SPP; in kvm_riscv_vcpu_set_reg_core()