Skip to content

Commit

Permalink
Add time and instret to perf counter delegation
Browse files Browse the repository at this point in the history
Currently, we can only delegate the cycle register in Miralis when delegating the perf counter. This commit adds the two other registers and delegates the perf counters on the VisionFive2 board in the release build.
  • Loading branch information
francois141 committed Jan 29, 2025
1 parent f0025b2 commit 8e59582
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/virt/emulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ impl VirtContext {
let instr = unsafe { get_raw_faulting_instr(&self.trap_info) };
log::warn!("IllegalInstruction {:x}", instr);
assert!(Arch::read_csr(Csr::Mcounteren) >= 7,"Good");
assert!(Arch::read_csr(Csr::Mcounteren) >= 7,"Good2");
self.emulate_jump_trap_handler()
}
_ => self.emulate_jump_trap_handler(),
Expand Down

0 comments on commit 8e59582

Please sign in to comment.