> I understand for performance reasons the results would be skewed, but
> is there a VM that correctly handles and uses performance counters?
AFAIK today's virtual machines do not fully emulate PMC behavior.
> Right now I've been working on querying the CPU in VMWare Player with
> Minix, and I appear to be able to read from and write to MSRs and
> PMCs, but thats it. Either it's quietly failing (the kernel is eating
> the exception somehow) or VMWare Player only returns 0 when reading
> PMCs.
You may need to run Minix on bare metal then.
> Would PMCTools be able to detect that and handle it, or would it
> assume that these work if the processor says they exist? Like
> checking if a non-zero value can be written and read back?
> (Processor is an E7500 Core2 Duo with Intel's Architectural
> Performance Monitoring capabilities version 2)
The kernel driver assumes that the PMCs that are reported as present
by the processor will work as documented.
Koshy