Re: Using PMU cycle counter in guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 5 August 2013 22:47, Zhuoqun Cheng <czq@xxxxxx> wrote:
So, I am wondering if it is possible to use PMU cycle counter in guest, both kernel mode and user mode? I tried to use kernel module to enable user mode access to cycle counter in host and it worked. But it seems that guest kernel I am using doesn't support kernel module (I am using this one: http://www.virtualopensystems.com/media/arndale/guest-zImage). I tried to add a syscall to enable user mode access but failed either (got illegal instruction error when programming counter in user mode).

Can anyone give me any instruction or pointer on this? Thanks very much!

By default, guest access to the PMU is trapped. If you disable the trap mechanism you can use the PMU from the guest both in kernel and user mode. Of course if you start using (for example) the cycle counter and in between there is a vm exit (due to any reason), you will also measure cycles spent in the host.

Regards.
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm

[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux