linux/arch/riscv/kvm
Fangyu Yu 1fa7e6e78b RISC-V: KVM: Fix guest page fault within HLV* instructions
[ Upstream commit 974555d6e4 ]

When executing HLV* instructions at the HS mode, a guest page fault
may occur when a g-stage page table migration between triggering the
virtual instruction exception and executing the HLV* instruction.

This may be a corner case, and one simpler way to handle this is to
re-execute the instruction where the virtual  instruction exception
occurred, and the guest page fault will be automatically handled.

Fixes: b91f0e4cb8 ("RISC-V: KVM: Factor-out instruction emulation into separate sources")
Signed-off-by: Fangyu Yu <fangyu.yu@linux.alibaba.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20251121133543.46822-1-fangyu.yu@linux.alibaba.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-12-18 14:03:12 +01:00
..
aia.c RISC-V: KVM: Move HGEI[E|P] CSR access to IMSIC virtualization 2025-07-11 18:33:27 +05:30
aia_aplic.c RISC-V: KVM: Fix APLIC in_clrip and clripnum write emulation 2024-11-05 13:27:28 +05:30
aia_device.c RISC-V: KVM: Drop the return value of kvm_riscv_vcpu_aia_init() 2025-07-28 22:27:07 +05:30
aia_imsic.c RISC-V: KVM: Read HGEIP CSR on the correct cpu 2025-10-17 13:10:01 +05:30
gstage.c RISC-V: KVM: Prevent HGATP_MODE_BARE passed 2025-09-16 10:54:05 +05:30
Kconfig entry: Rename "kvm" entry code assets to "virt" to genericize APIs 2025-09-30 22:50:18 +00:00
main.c RISC-V: KVM: Prevent HGATP_MODE_BARE passed 2025-09-16 10:54:05 +05:30
Makefile RISC-V: KVM: add support for FWFT SBI extension 2025-09-08 09:52:57 +05:30
mmu.c RISC-V: KVM: Remove automatic I/O mapping for VM_PFNMAP 2025-10-24 21:24:36 +05:30
nacl.c RISC-V: KVM: Add common nested acceleration support 2024-10-28 16:43:57 +05:30
tlb.c RISC-V: KVM: Pass VMID as parameter to kvm_riscv_hfence_xyz() APIs 2025-07-28 22:27:32 +05:30
trace.h RISCV: KVM: add tracepoints for entry and exit events 2024-06-26 18:37:36 +05:30
vcpu.c RISC-V: KVM: Fix check for local interrupts on riscv32 2025-10-16 17:17:29 +05:30
vcpu_exit.c RISC-V: KVM: Factor-out g-stage page table management 2025-07-28 22:27:30 +05:30
vcpu_fp.c riscv: Rearrange hwcap.h and cpufeature.h 2023-11-09 10:15:51 -08:00
vcpu_insn.c RISC-V: KVM: Fix guest page fault within HLV* instructions 2025-12-18 14:03:12 +01:00
vcpu_onereg.c RISC-V: KVM: Move copy_sbi_ext_reg_indices() to SBI implementation 2025-09-16 10:54:18 +05:30
vcpu_pmu.c RISC-V: KVM: Implement get event info function 2025-09-16 11:49:31 +05:30
vcpu_sbi.c RISC-V: KVM: Move copy_sbi_ext_reg_indices() to SBI implementation 2025-09-16 10:54:18 +05:30
vcpu_sbi_base.c RISC-V: KVM: Add ONE_REG interface to enable/disable SBI extensions 2023-04-21 17:38:44 +05:30
vcpu_sbi_fwft.c RISC-V: KVM: Implement ONE_REG interface for SBI FWFT state 2025-09-16 10:54:21 +05:30
vcpu_sbi_hsm.c KVM: RISC-V: refactor sbi reset request 2025-05-21 09:34:49 +05:30
vcpu_sbi_pmu.c RISC-V: KVM: Implement get event info function 2025-09-16 11:49:31 +05:30
vcpu_sbi_replace.c RISC-V: KVM: Pass VMID as parameter to kvm_riscv_hfence_xyz() APIs 2025-07-28 22:27:32 +05:30
vcpu_sbi_sta.c RISC-V: KVM: No need of explicit writable slot check 2025-09-16 11:49:31 +05:30
vcpu_sbi_system.c KVM: RISC-V: refactor sbi reset request 2025-05-21 09:34:49 +05:30
vcpu_sbi_v01.c RISC-V: KVM: Pass VMID as parameter to kvm_riscv_hfence_xyz() APIs 2025-07-28 22:27:32 +05:30
vcpu_switch.S RISC-V: KVM: Use SBI sync SRET call when available 2024-10-28 16:44:03 +05:30
vcpu_timer.c RISC-V: KVM: Disable vstimecmp before exiting to user-space 2025-07-11 18:30:17 +05:30
vcpu_vector.c RISC-V: KVM: fix stack overrun when loading vlenb 2025-08-25 10:26:20 +05:30
vm.c RISC-V: KVM: Factor-out g-stage page table management 2025-07-28 22:27:30 +05:30
vmid.c RISC-V: KVM: Remove unnecessary HGATP csr_read 2025-09-16 10:54:03 +05:30