[PW_SID:1072898] RISC-V: restore U-mode counter access (scounteren)#1672
[PW_SID:1072898] RISC-V: restore U-mode counter access (scounteren)#1672linux-riscv-bot wants to merge 1 commit into
Conversation
In commit 5bc4097 ("RISC-V: KVM: Remove scounteren initialization") the initialization of scounteren was moved from the hypervisor (KVM) to the supervisor -- a well-argued change. However, the same change also restricted access to performance counters without comment: previously, scounteren was set to 0x7 (0b111), allowing U-mode (userspace) access to instret (IR), cycle (CY), and time (TM). After the change, scounteren is set to 0x2 (0b010), which allows access only to time (TM) and prohibits access to instret (IR) and cycle (CY). This breaks user- space programs that directly use these performance counters. This change restores the prior behavior: scounteren is set to 0x7, which re-enables U-mode (userspace) access to instret (IR), cycle (CY), and time (TM). Fixes: 5bc4097 ("RISC-V: KVM: Remove scounteren initialization") Signed-off-by: Manfred SCHLAEGL <manfred.schlaegl@gmx.at> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
|
Patch 1: "RISC-V: restore U-mode counter access (scounteren)" |
PR for series 1072898 applied to workflow__riscv__fixes
Name: RISC-V: restore U-mode counter access (scounteren)
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1072898
Version: 1