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


Minggui Cao
 

That is reasonable. It means APIC pass-through not set. Let me check,

 

 

  1. You can refer this file to modify yours:

misc/config_tools/data/whl-ipc-i5/hybrid_rt.xml

 

 

  <vm id="0">

    <vm_type>PRE_RT_VM</vm_type>

    <name>PRE_RT_VM0</name>

    <guest_flags>

      <guest_flag>GUEST_FLAG_LAPIC_PASSTHROUGH</guest_flag>

      <guest_flag>GUEST_FLAG_RT</guest_flag>

    </guest_flags>

 

 

  1. After you build hypervisor, you can check:

build/hypervisor/configs/scenarios/hybrid_rt/vm_configurations.c:23:            .guest_flags = (GUEST_FLAG_STATIC_VM | GUEST_FLAG_LAPIC_PASSTHROUGH | GUEST_FLAG_RT),

 

 

good luck.

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of Paolo Crotti
Sent: Tuesday, March 29, 2022 6:16 PM
To: acrn-users@...
Subject: Re: [acrn-users] Using perf to access hardware events in pre-launched VM

 

Hi Minggui,

I'm sorry, I didn't realize I had to read the 0x186 register from inside the VM. I had read it from the ACRN shell (ACRN: \> rdmsr 0x186).

Actually, I cannot read these registers from the virtual machine. In addition, when I try to read them I got two strange error messages:

usb-ubuntu@usbubuntu-C93:~$ sudo rdmsr 0x186[1131822537us][cpu=0][vm0:vcpu0][sev=1][seq=44]:dispatch VM exit handler failed for reason 31, ret = -13!

rdmsr: CPU 0 cannot read MSR 0x00000186

usb-ubuntu@usbubuntu-C93:~$ sudo rdmsr 0x38f[1149902298us][cpu=0][vm0:vcpu0][sev=1][seq=46]:dispatch VM exit handler failed for reason 31, ret = -13!

rdmsr: CPU 0 cannot read MSR 0x0000038f


 

Join acrn-users@lists.projectacrn.org to automatically receive all group messages.