sync: rvck #116: Collect guest/host statistics during the redirected traps#167
Merged
Conversation
mainline inclusion from Linux 6.13 commit e325618349cdc1fbbe63574080249730e7cff9ea category: feature bugzilla: RVCK-Project/rvck#115 -------------------------------- The KVM RISC-V does not delegate AMO load/store access fault traps to VS-mode (hedeleg) so typically M-mode takes these traps and redirects them back to HS-mode. However, upon returning from M-mode, the KVM RISC-V running in HS-mode terminates VS-mode software. The KVM RISC-V should redirect AMO load/store access fault traps back to VS-mode and let the VS-mode trap handler determine the next steps. Signed-off-by: Yu-Wei Hsu <betterman5240@gmail.com> Signed-off-by: Anup Patel <anup@brainfault.org> Signed-off-by: yechao-w <wang.yechao255@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 30d6630)
mainline inclusion from Linux 6.13 commit 51c58956732bb20c5782dea1b2966270827e3aa2 category: feature bugzilla: RVCK-Project/rvck#115 -------------------------------- The M-mode redirects an unhandled instruction access fault trap back to S-mode when not delegating it to VS-mode(hedeleg). However, KVM running in HS-mode terminates the VS-mode software when back from M-mode. The KVM should redirect the trap back to VS-mode, and let VS-mode trap handler decide the next step. Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Anup Patel <anup@brainfault.org> Signed-off-by: yechao-w <wang.yechao255@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 7b071e1)
mainline inclusion from Linux 6.13 commit 2f15b5eaff79b70b004b0aae79dee62d3b3abda0 category: feature bugzilla: RVCK-Project/rvck#115 -------------------------------- SBI PMU specification defines few firmware counters which can be used by the guests to collect the statstics about various traps occurred in the host. Update these counters whenever a corresponding trap is taken Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Anup Patel <anup@brainfault.org> Signed-off-by: yechao-w <wang.yechao255@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 9dbd5aa)
mainline inclusion from Linux 6.13 commit af79caa83f6aa41e9092292a2ba7f701e57353ec category: feature bugzilla: RVCK-Project/rvck#115 -------------------------------- Currently, kvm doesn't delegate the few traps such as misaligned load/store, illegal instruction and load/store access faults because it is not expected to occur in the guest very frequently. Thus, kvm gets a chance to act upon it or collect statistics about it before redirecting the traps to the guest. Collect both guest and host visible statistics during the traps. Enable them so that both guest and host can collect the stats about them if required. Signed-off-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Anup Patel <anup@brainfault.org> Signed-off-by: yechao-w <wang.yechao255@zte.com.cn> Signed-off-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 207e152)
|
开始测试 log: https://github.com/RVCK-Project/rvck-olk/actions/runs/24122386042 参数解析结果
测试完成 详细结果:RVCK result
Kunit Test Result[07:05:05] Testing complete. Ran 454 tests: passed: 442, skipped: 12 Kernel Build ResultKernel build failed. Check Patch Result
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync commits from rvck PR #116.
Source PR: RVCK-Project/rvck#116
Commits
30d66309150cRISC-V: KVM: Redirect AMO load/store access fault traps to guest7b071e109258RISC-V: KVM: Redirect instruction access fault trap to guest9dbd5aaa1151RISC-V: KVM: Update firmware counters for various events207e152565e3RISC-V: KVM: Add new exit statstics for redirected traps