machyve / xhyve

xhyve, a lightweight OS X virtualization solution
Other
6.43k stars 354 forks source link

Performance counter virtualization #91

Open kayceesrk opened 8 years ago

kayceesrk commented 8 years ago

Currently performance counter MSRs are not advertised to the guest. Is this expected to change in the near future?

xez commented 8 years ago

Do you have a specific use case in mind? Performance counters are perturbed by host activity. Having them only count guest activity is a bit tricky and might require support from Hypervisor.framework. Even with support, the measurements might not end up being useful.

kayceesrk commented 8 years ago

The use case I have in mind is rr record and replay framework, which depends on certain performance counter features. However, it is unclear to me what subset of features are required for rr for its record and replay.

sidkshatriya commented 7 years ago

@xez and others:

This is actually quite a cool (and to my mind, important) feature. VMWare supports performance counter virtualization (also called PMU virtualization). Parallels also claims to do the same (though it seems to be broken).

Having this will allow some real powerful programs like mozilla/rr to be run on xhyve

Are there plans to support this now or in the future?

rickard-von-essen commented 7 years ago

@sidkshatriya Just a note about Parallels and the bug you link. The author uses a ~4 y old version of Parallels Desktop for Mac so I wouldn't assume that it the current state of PD PMU virtualization.

sidkshatriya commented 7 years ago

@rickard-von-essen Very useful observation -- Thanks for noticing that. Maybe you could update the ticket https://github.com/mozilla/rr/issues/1818 with the same info?