Lines Matching full:csr
72 struct kvm_vcpu_aia_csr *csr = &vcpu->arch.aia_context.guest_csr; in kvm_riscv_vcpu_aia_flush_interrupts() local
82 csr->hviph &= ~mask; in kvm_riscv_vcpu_aia_flush_interrupts()
83 csr->hviph |= val; in kvm_riscv_vcpu_aia_flush_interrupts()
89 struct kvm_vcpu_aia_csr *csr = &vcpu->arch.aia_context.guest_csr; in kvm_riscv_vcpu_aia_sync_interrupts() local
92 csr->vsieh = ncsr_read(CSR_VSIEH); in kvm_riscv_vcpu_aia_sync_interrupts()
126 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_vcpu_aia_update_hvip() local
134 ncsr_write(CSR_HVICTL, aia_hvictl_value(!!(csr->hvip & BIT(IRQ_VS_EXT)))); in kvm_riscv_vcpu_aia_update_hvip()
139 struct kvm_vcpu_aia_csr *csr = &vcpu->arch.aia_context.guest_csr; in kvm_riscv_vcpu_aia_load() local
147 nacl_csr_write(nsh, CSR_VSISELECT, csr->vsiselect); in kvm_riscv_vcpu_aia_load()
148 nacl_csr_write(nsh, CSR_HVIPRIO1, csr->hviprio1); in kvm_riscv_vcpu_aia_load()
149 nacl_csr_write(nsh, CSR_HVIPRIO2, csr->hviprio2); in kvm_riscv_vcpu_aia_load()
151 nacl_csr_write(nsh, CSR_VSIEH, csr->vsieh); in kvm_riscv_vcpu_aia_load()
152 nacl_csr_write(nsh, CSR_HVIPH, csr->hviph); in kvm_riscv_vcpu_aia_load()
153 nacl_csr_write(nsh, CSR_HVIPRIO1H, csr->hviprio1h); in kvm_riscv_vcpu_aia_load()
154 nacl_csr_write(nsh, CSR_HVIPRIO2H, csr->hviprio2h); in kvm_riscv_vcpu_aia_load()
157 csr_write(CSR_VSISELECT, csr->vsiselect); in kvm_riscv_vcpu_aia_load()
158 csr_write(CSR_HVIPRIO1, csr->hviprio1); in kvm_riscv_vcpu_aia_load()
159 csr_write(CSR_HVIPRIO2, csr->hviprio2); in kvm_riscv_vcpu_aia_load()
161 csr_write(CSR_VSIEH, csr->vsieh); in kvm_riscv_vcpu_aia_load()
162 csr_write(CSR_HVIPH, csr->hviph); in kvm_riscv_vcpu_aia_load()
163 csr_write(CSR_HVIPRIO1H, csr->hviprio1h); in kvm_riscv_vcpu_aia_load()
164 csr_write(CSR_HVIPRIO2H, csr->hviprio2h); in kvm_riscv_vcpu_aia_load()
171 struct kvm_vcpu_aia_csr *csr = &vcpu->arch.aia_context.guest_csr; in kvm_riscv_vcpu_aia_put() local
179 csr->vsiselect = nacl_csr_read(nsh, CSR_VSISELECT); in kvm_riscv_vcpu_aia_put()
180 csr->hviprio1 = nacl_csr_read(nsh, CSR_HVIPRIO1); in kvm_riscv_vcpu_aia_put()
181 csr->hviprio2 = nacl_csr_read(nsh, CSR_HVIPRIO2); in kvm_riscv_vcpu_aia_put()
183 csr->vsieh = nacl_csr_read(nsh, CSR_VSIEH); in kvm_riscv_vcpu_aia_put()
184 csr->hviph = nacl_csr_read(nsh, CSR_HVIPH); in kvm_riscv_vcpu_aia_put()
185 csr->hviprio1h = nacl_csr_read(nsh, CSR_HVIPRIO1H); in kvm_riscv_vcpu_aia_put()
186 csr->hviprio2h = nacl_csr_read(nsh, CSR_HVIPRIO2H); in kvm_riscv_vcpu_aia_put()
189 csr->vsiselect = csr_read(CSR_VSISELECT); in kvm_riscv_vcpu_aia_put()
190 csr->hviprio1 = csr_read(CSR_HVIPRIO1); in kvm_riscv_vcpu_aia_put()
191 csr->hviprio2 = csr_read(CSR_HVIPRIO2); in kvm_riscv_vcpu_aia_put()
193 csr->vsieh = csr_read(CSR_VSIEH); in kvm_riscv_vcpu_aia_put()
194 csr->hviph = csr_read(CSR_HVIPH); in kvm_riscv_vcpu_aia_put()
195 csr->hviprio1h = csr_read(CSR_HVIPRIO1H); in kvm_riscv_vcpu_aia_put()
196 csr->hviprio2h = csr_read(CSR_HVIPRIO2H); in kvm_riscv_vcpu_aia_put()
205 struct kvm_vcpu_aia_csr *csr = &vcpu->arch.aia_context.guest_csr; in kvm_riscv_vcpu_aia_get_csr() local
212 *out_val = ((unsigned long *)csr)[reg_num]; in kvm_riscv_vcpu_aia_get_csr()
221 struct kvm_vcpu_aia_csr *csr = &vcpu->arch.aia_context.guest_csr; in kvm_riscv_vcpu_aia_set_csr() local
227 ((unsigned long *)csr)[reg_num] = val; in kvm_riscv_vcpu_aia_set_csr()