linux/arch/riscv/kvm
Vincent Chen 33e5b5746c KVM: RISC-V: Avoid spurious virtual interrupts after clearing hideleg CSR
When the last VM is terminated, the host kernel will invoke function
hardware_disable_nolock() on each CPU to disable the related virtualization
functions. Here, RISC-V currently only clears hideleg CSR and hedeleg CSR.
This behavior will cause the host kernel to receive spurious interrupts if
hvip CSR has pending interrupts and the corresponding enable bits in vsie
CSR are asserted. To avoid it, hvip CSR and vsie CSR must be cleared
before clearing hideleg CSR.

Fixes: 99cdc6c18c ("RISC-V: Add initial skeletal KVM support")
Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
2022-01-06 15:18:18 +05:30
..
Kconfig riscv: do not select non-existing config ANON_INODES 2021-10-22 05:53:37 -04:00
main.c KVM: RISC-V: Avoid spurious virtual interrupts after clearing hideleg CSR 2022-01-06 15:18:18 +05:30
Makefile RISC-V: KVM: Add SBI HSM extension in KVM 2022-01-06 15:12:47 +05:30
mmu.c RISC-V: KVM: Add VM capability to allow userspace get GPA bits 2022-01-06 15:16:58 +05:30
tlb.S RISC-V: KVM: Fix GPA passed to __kvm_riscv_hfence_gvma_xyz() functions 2021-10-31 02:45:43 -04:00
vcpu_exit.c KVM: Rename kvm_vcpu_block() => kvm_vcpu_halt() 2021-12-08 04:24:51 -05:00
vcpu_fp.c RISC-V: KVM: make kvm_riscv_vcpu_fp_clean() static 2022-01-06 15:13:58 +05:30
vcpu_sbi_base.c RISC-V: KVM: Forward SBI experimental and vendor extensions 2022-01-06 15:14:33 +05:30
vcpu_sbi_hsm.c RISC-V: KVM: Add SBI HSM extension in KVM 2022-01-06 15:12:47 +05:30
vcpu_sbi_replace.c RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v0.2 2022-01-06 15:12:15 +05:30
vcpu_sbi_v01.c RISC-V: KVM: Reorganize SBI code by moving SBI v0.1 to its own file 2022-01-06 14:57:16 +05:30
vcpu_sbi.c RISC-V: KVM: Forward SBI experimental and vendor extensions 2022-01-06 15:14:33 +05:30
vcpu_switch.S RISC-V: KVM: FP lazy save/restore 2021-10-04 16:08:23 +05:30
vcpu_timer.c RISC-V: KVM: remove unneeded semicolon 2021-11-01 17:35:13 +05:30
vcpu.c RISC-V: KVM: Add SBI HSM extension in KVM 2022-01-06 15:12:47 +05:30
vm.c RISC-V: KVM: Add VM capability to allow userspace get GPA bits 2022-01-06 15:16:58 +05:30
vmid.c KVM: Use 'unsigned long' as kvm_for_each_vcpu()'s index 2021-12-08 04:24:15 -05:00