Guest OS to use Hardware Performance Counters

This is for discussing general topics about how to use VirtualBox.
Post Reply
Taral
Posts: 2
Joined: 18. Dec 2013, 15:23

Guest OS to use Hardware Performance Counters

Post by Taral »

Hi All,

Does anyone know if there is any setting that can be done to allows the guest OS to use hardware performance counters directly. For example in linux using perf utility. Basically i want CPU perf counters to be accessed directly in the VM guest (Linux).
Ramshankar
Oracle Corporation
Posts: 793
Joined: 7. Jan 2008, 16:17

Re: Guest OS to use Hardware Performance Counters

Post by Ramshankar »

We don't yet implement the performance counter MSRs correctly (i.e. our RDPMC implementation just returns zeros) but might we might handle a few of them that makes sense. And no, there is no simple "Setting" which will make this work. Implementing them in a somewhat sensible manner even though a few of them makes no sense in a VM requires a lot of code and it is work in progress.
Oracle Corp.
Taral
Posts: 2
Joined: 18. Dec 2013, 15:23

Re: Guest OS to use Hardware Performance Counters

Post by Taral »

Thanks RamShankar for quick response
mancha
Posts: 5
Joined: 5. Apr 2015, 17:08

Re: Guest OS to use Hardware Performance Counters

Post by mancha »

Hello Ramshankar et al.

First of all, many thanks for all your great work with VirtualBox!

It's been a bit since this thread was started and I was wondering if there was any news regarding progress with virtualizing CPU counters. As long as I'm asking, I was also curious if there were plans to add support for newer instructions (e.g. sse4).

Thanks.

--mancha
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Guest OS to use Hardware Performance Counters

Post by Perryg »

Can't answer the first question but the second has been available as experimental since 4.3.8
http://www.virtualbox.org/manual/ch09.h ... assthrough
mancha
Posts: 5
Joined: 5. Apr 2015, 17:08

Re: Guest OS to use Hardware Performance Counters

Post by mancha »

Perryg wrote:Can't answer the first question but the second has been available as experimental since 4.3.8
Hi. Thanks for the link! Will test sse4 support while I wait for word from Oracle regarding CPU perf virtualization.
Post Reply