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

Measuring the time of a world switch

Dear all,

Consider a scenario where a bare minimum hardware-assisted hypervisor is hosting 2 simple guest OSes on a dual-core Cortex-A15. I want to accurately measure the time it takes to switch from the guest OS to the hypervisor and then from the hypervisor to the other guest OS. Could you please advise me on a reliable and robust way to measure accurately the aforedescribed world switch time. Please share your experience.

Many thanks.

Parents
  • The same way you'd measure the time of anything else ...

    • Ideally I would use the cycle counter in the performance monitor block in CP15.
    • Alternatively you need another time source (e.g. hardware timer peripheral, real time clock, etc).

    The main issue you will have is making sure that both guests and the hypervisor can "see" the counters and the peripheral, so may be a little bit of platform setup needed.

    HTH,
    Pete

Reply
  • The same way you'd measure the time of anything else ...

    • Ideally I would use the cycle counter in the performance monitor block in CP15.
    • Alternatively you need another time source (e.g. hardware timer peripheral, real time clock, etc).

    The main issue you will have is making sure that both guests and the hypervisor can "see" the counters and the peripheral, so may be a little bit of platform setup needed.

    HTH,
    Pete

Children
No data