summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2026-10-23 10:37:31 -0700
committerAnup Patel <anup@brainfault.org>2026-11-16 18:06:17 +0530
commit403daa3414a6ad1378082f97b3a8bec08a50c641 (patch)
tree120af74d7a43ac6c5559acc03a45b08061d8cb52 /tools/perf/scripts/python
parentca6d379ee2f123512c30aa5b0592db648186d9af (diff)
RISC-V: KVM: Do not touch the envcfg CSRs on the SiFive P550
The SiFive P550 (ESWIN EIC7700X) implements the hypervisor extension on a privileged spec 1.11 base, so it has neither henvcfg nor senvcfg. KVM swaps senvcfg on every guest entry and writes henvcfg on vCPU load regardless, and the host dies on the first guest entry: Oops - illegal instruction [#1] Modules linked in: kvm CPU: 2 UID: 0 PID: 127 Comm: qemu-system-ris Not tainted 7.2.0+ #4 PREEMPTLAZY Hardware name: Unknown Unknown Product/Unknown Product, BIOS 2024.01 01/01/2024 epc : kvm_riscv_vcpu_enter_exit+0x26/0xcf8 [kvm] ra : kvm_arch_vcpu_ioctl_run+0x4ce/0x5a6 [kvm] status: 0000000200000100 badaddr: 0000000010a797f3 cause: 0000000000000002 [<ffffffff01df432e>] kvm_riscv_vcpu_enter_exit+0x26/0xcf8 [kvm] [<ffffffff01deb3b0>] kvm_arch_vcpu_ioctl_run+0x4ce/0x5a6 [kvm] [<ffffffff01dd7914>] kvm_vcpu_ioctl+0x180/0x5e4 [kvm] [<ffffffff8025702e>] __riscv_sys_ioctl+0x84/0x9a [<ffffffff80dfdc72>] do_trap_ecall_u+0x1d8/0x38a [<ffffffff80e08644>] handle_exception+0x168/0x174 Code: 84aa 892e b703 8887 1773 1067 3023 16e5 b783 8907 (97f3) 10a7 Introduce a hardware quirk for this core, similar to the Andes AX66 TLB one, and skip both CSRs when it is set. The FWFT features that KVM implements with henvcfg bits then disabled. Fixes: db3c01c7a308 ("RISCV: KVM: Add senvcfg context save/restore") Suggested-by: Anup Patel <anup@brainfault.org> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20261023173731.3559650-1-dave@stgolabs.net Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions