Lines Matching refs:csr

111 	struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr;  in kvm_riscv_reset_vcpu()  local
129 memcpy(csr, reset_csr, sizeof(*csr)); in kvm_riscv_reset_vcpu()
413 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_vcpu_get_reg_csr() local
428 reg_val = (csr->hvip >> VSIP_TO_HVIP_SHIFT) & VSIP_VALID_MASK; in kvm_riscv_vcpu_get_reg_csr()
430 reg_val = ((unsigned long *)csr)[reg_num]; in kvm_riscv_vcpu_get_reg_csr()
441 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_vcpu_set_reg_csr() local
462 ((unsigned long *)csr)[reg_num] = reg_val; in kvm_riscv_vcpu_set_reg_csr()
680 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_vcpu_flush_interrupts() local
687 csr->hvip &= ~mask; in kvm_riscv_vcpu_flush_interrupts()
688 csr->hvip |= val; in kvm_riscv_vcpu_flush_interrupts()
696 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_vcpu_sync_interrupts() local
699 csr->vsie = csr_read(CSR_VSIE); in kvm_riscv_vcpu_sync_interrupts()
703 if ((csr->hvip ^ hvip) & (1UL << IRQ_VS_SOFT)) { in kvm_riscv_vcpu_sync_interrupts()
828 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_arch_vcpu_load() local
830 csr_write(CSR_VSSTATUS, csr->vsstatus); in kvm_arch_vcpu_load()
831 csr_write(CSR_VSIE, csr->vsie); in kvm_arch_vcpu_load()
832 csr_write(CSR_VSTVEC, csr->vstvec); in kvm_arch_vcpu_load()
833 csr_write(CSR_VSSCRATCH, csr->vsscratch); in kvm_arch_vcpu_load()
834 csr_write(CSR_VSEPC, csr->vsepc); in kvm_arch_vcpu_load()
835 csr_write(CSR_VSCAUSE, csr->vscause); in kvm_arch_vcpu_load()
836 csr_write(CSR_VSTVAL, csr->vstval); in kvm_arch_vcpu_load()
837 csr_write(CSR_HVIP, csr->hvip); in kvm_arch_vcpu_load()
838 csr_write(CSR_VSATP, csr->vsatp); in kvm_arch_vcpu_load()
855 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_arch_vcpu_put() local
865 csr->vsstatus = csr_read(CSR_VSSTATUS); in kvm_arch_vcpu_put()
866 csr->vsie = csr_read(CSR_VSIE); in kvm_arch_vcpu_put()
867 csr->vstvec = csr_read(CSR_VSTVEC); in kvm_arch_vcpu_put()
868 csr->vsscratch = csr_read(CSR_VSSCRATCH); in kvm_arch_vcpu_put()
869 csr->vsepc = csr_read(CSR_VSEPC); in kvm_arch_vcpu_put()
870 csr->vscause = csr_read(CSR_VSCAUSE); in kvm_arch_vcpu_put()
871 csr->vstval = csr_read(CSR_VSTVAL); in kvm_arch_vcpu_put()
872 csr->hvip = csr_read(CSR_HVIP); in kvm_arch_vcpu_put()
873 csr->vsatp = csr_read(CSR_VSATP); in kvm_arch_vcpu_put()
923 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_update_hvip() local
925 csr_write(CSR_HVIP, csr->hvip); in kvm_riscv_update_hvip()