[PW_SID:965532] Add SBI v3.0 PMU enhancements#433
Conversation
There are new PMU related features introduced in SBI v3.0. 1. Raw Event v2 which allows mhpmeventX value to be 56 bit wide. 2. Get Event info function to do a bulk query at one shot. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
SBI v3.0 introduced a new raw event type that allows wider mhpmeventX width to be programmed via CFG_MATCH. Use the raw event v2 if SBI v3.0 is available. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
SBI v3.0 introuced a new raw event type v2 for wider mhpmeventX programming. Add the support in kvm for that. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
With the new SBI PMU event info function, we can query the availability of the all standard SBI PMU events at boot time with a single ecall. This improves the bootime by avoiding making an SBI call for each standard PMU event. Since this function is defined only in SBI v3.0, invoke this only if the underlying SBI implementation is v3.0 or higher. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The event mapping function can be used in event info function to find out the corresponding SBI PMU event encoding during the get_event_info function as well. Refactor and export it so that it can be invoked from kvm and internal driver. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The arch specific code may need to validate a gpa range if it is a shared memory between the host and the guest. Currently, there are few places where it is used in RISC-V implementation. Given the nature of the function it may be used for other architectures. Hence, a common helper function is added. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Remove the duplicate code and use the new helper function to validate the shared memory gpa address. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The new get_event_info funciton allows the guest to query the presence of multiple events with single SBI call. Currently, the perf driver in linux guest invokes it for all the standard SBI PMU events. Support the SBI function implementation in KVM as well. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Upgrade the SBI version to v3.0 so that corresponding features can be enabled in the guest. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 1: "[v3,1/9] drivers/perf: riscv: Add SBI v3.0 flag" |
|
Patch 2: "[v3,2/9] drivers/perf: riscv: Add raw event v2 support" |
|
Patch 2: "[v3,2/9] drivers/perf: riscv: Add raw event v2 support" |
|
Patch 2: "[v3,2/9] drivers/perf: riscv: Add raw event v2 support" |
|
Patch 2: "[v3,2/9] drivers/perf: riscv: Add raw event v2 support" |
|
Patch 2: "[v3,2/9] drivers/perf: riscv: Add raw event v2 support" |
|
Patch 2: "[v3,2/9] drivers/perf: riscv: Add raw event v2 support" |
|
Patch 2: "[v3,2/9] drivers/perf: riscv: Add raw event v2 support" |
|
Patch 2: "[v3,2/9] drivers/perf: riscv: Add raw event v2 support" |
|
Patch 2: "[v3,2/9] drivers/perf: riscv: Add raw event v2 support" |
|
Patch 7: "[v3,7/9] RISC-V: KVM: Use the new gpa range validate helper function" |
|
Patch 7: "[v3,7/9] RISC-V: KVM: Use the new gpa range validate helper function" |
|
Patch 7: "[v3,7/9] RISC-V: KVM: Use the new gpa range validate helper function" |
|
Patch 7: "[v3,7/9] RISC-V: KVM: Use the new gpa range validate helper function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 8: "[v3,8/9] RISC-V: KVM: Implement get event info function" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
|
Patch 9: "[v3,9/9] RISC-V: KVM: Upgrade the supported SBI version to 3.0" |
PR for series 965532 applied to workflow__riscv__fixes
Name: Add SBI v3.0 PMU enhancements
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=965532
Version: 3