This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Directly Accessing Cycle Counter From Guest VM

Hello!

We have implemented our university research project on Armv8 development board, and we would now like to run some performance testings.

Would it be possible to directly access processor cycle counter register (PMCCNTR_EL0) from a KVM-based guest virtual machine?

The current access does read the register but by trapping to an EL2 hypervisor.
We would like to access the register multiple times during the test without adding extra overheads, and we would also like to accurately measure world-switch costs.

Any comments would be very appreciated! :)

Thanks!

Parents
  • I'm not a KVM expert, so can't comment on whether you can persuade KVM not to trap the accesses to PMNCCTNR.  As a possible alternative, have you consider reading the virtual or physical count registers in the Generic Timer?  These give time, rather than cycles, which isn't effected by things like DVFS.

Reply
  • I'm not a KVM expert, so can't comment on whether you can persuade KVM not to trap the accesses to PMNCCTNR.  As a possible alternative, have you consider reading the virtual or physical count registers in the Generic Timer?  These give time, rather than cycles, which isn't effected by things like DVFS.

Children