Re: Using perf to access hardware events in pre-launched VM

Minggui Cao


  In ACRN2.7 it has supported to pass-through PMU (hardware events) to RTVM.  For cache-misses, LLC-stores, LLC-store-misses hardware events, it shall support.


You can have a check for pre-launch VM:

1. rdmsr  0x186 à if can’t read, it could be some configuration issues.

2. please check your scenario file:


  <vm id=”0”>




<lapic_passthrough>y</lapic_passthrough>  à if it is configured,  you can search code: is_lapic_pt_configured shall be used for PMU MSRs.







From: acrn-users@... <acrn-users@...> On Behalf Of Paolo Crotti
Sent: Wednesday, March 23, 2022 11:55 PM
To: acrn-users@...
Subject: [acrn-users] Using perf to access hardware events in pre-launched VM


Hi everyone,

I am working with ACRN in order to make some performance test on VMs in a pre-launched scenario. To take measurements i thought to use perf but it seems there is no way to access the hardware events i'm intrested in. In particular the events affecting the cache such as: cache-misses, LLC-stores, LLC-store-misses.
On the VMs runs Ubuntu 18.04 with kernel 5.4.0-100-generic.

Is there any way to allow perf to read these events? Or are there other tools I could use to access this information?

Software Versions:
ACRN Kernel v2.7
ACRN Hypervisor v2.7

Thanks in advance!

Join to automatically receive all group messages.