Lines Matching full:csr

20 #include <asm/csr.h>
51 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_reset_vcpu() local
69 memcpy(csr, reset_csr, sizeof(*csr)); in kvm_riscv_reset_vcpu()
342 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_vcpu_flush_interrupts() local
349 csr->hvip &= ~mask; in kvm_riscv_vcpu_flush_interrupts()
350 csr->hvip |= val; in kvm_riscv_vcpu_flush_interrupts()
361 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_vcpu_sync_interrupts() local
364 csr->vsie = csr_read(CSR_VSIE); in kvm_riscv_vcpu_sync_interrupts()
368 if ((csr->hvip ^ hvip) & (1UL << IRQ_VS_SOFT)) { in kvm_riscv_vcpu_sync_interrupts()
381 if ((csr->hvip ^ hvip) & (1UL << IRQ_PMU_OVF)) { in kvm_riscv_vcpu_sync_interrupts()
564 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_arch_vcpu_load() local
567 csr_write(CSR_VSSTATUS, csr->vsstatus); in kvm_arch_vcpu_load()
568 csr_write(CSR_VSIE, csr->vsie); in kvm_arch_vcpu_load()
569 csr_write(CSR_VSTVEC, csr->vstvec); in kvm_arch_vcpu_load()
570 csr_write(CSR_VSSCRATCH, csr->vsscratch); in kvm_arch_vcpu_load()
571 csr_write(CSR_VSEPC, csr->vsepc); in kvm_arch_vcpu_load()
572 csr_write(CSR_VSCAUSE, csr->vscause); in kvm_arch_vcpu_load()
573 csr_write(CSR_VSTVAL, csr->vstval); in kvm_arch_vcpu_load()
575 csr_write(CSR_HVIP, csr->hvip); in kvm_arch_vcpu_load()
576 csr_write(CSR_VSATP, csr->vsatp); in kvm_arch_vcpu_load()
606 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_arch_vcpu_put() local
621 csr->vsstatus = csr_read(CSR_VSSTATUS); in kvm_arch_vcpu_put()
622 csr->vsie = csr_read(CSR_VSIE); in kvm_arch_vcpu_put()
623 csr->vstvec = csr_read(CSR_VSTVEC); in kvm_arch_vcpu_put()
624 csr->vsscratch = csr_read(CSR_VSSCRATCH); in kvm_arch_vcpu_put()
625 csr->vsepc = csr_read(CSR_VSEPC); in kvm_arch_vcpu_put()
626 csr->vscause = csr_read(CSR_VSCAUSE); in kvm_arch_vcpu_put()
627 csr->vstval = csr_read(CSR_VSTVAL); in kvm_arch_vcpu_put()
628 csr->hvip = csr_read(CSR_HVIP); in kvm_arch_vcpu_put()
629 csr->vsatp = csr_read(CSR_VSATP); in kvm_arch_vcpu_put()
682 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_update_hvip() local
684 csr_write(CSR_HVIP, csr->hvip); in kvm_riscv_update_hvip()
691 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_vcpu_swap_in_guest_state() local
694 vcpu->arch.host_senvcfg = csr_swap(CSR_SENVCFG, csr->senvcfg); in kvm_riscv_vcpu_swap_in_guest_state()
704 struct kvm_vcpu_csr *csr = &vcpu->arch.guest_csr; in kvm_riscv_vcpu_swap_in_host_state() local
707 csr->senvcfg = csr_swap(CSR_SENVCFG, vcpu->arch.host_senvcfg); in kvm_riscv_vcpu_swap_in_host_state()
755 /* Process CSR value returned from user-space */ in kvm_arch_vcpu_ioctl_run()
817 /* Update HVIP CSR for current CPU */ in kvm_arch_vcpu_ioctl_run()