Re: Using perf to access hardware events in pre-launched VM
Minggui Cao
I don’t meet that issue. If you have Pre-launched RTVM / Service VM, you can check in ACRN console: vm_list And then vm_console N to switch the VM console.
Thanks Minggui
From: acrn-users@... <acrn-users@...>
On Behalf Of Paolo Crotti
IT WORKS! I set the scenario as you said and now I can read the cache events.
Thank you so much for the help.
Only one small note: when I use the GUEST_FLAG_LAPIC_PASSTHROUGH flag, the terminal of the VM (minicom) becomes unresponsive. When I start the VM, I see some of the kernel messages: it displays only the ones with the time (like [ 1.299022] Run /init as init process) and none with the "ok" (like [ OK ] Started WPA supplicant.). I cannot write or interact in any way with the shell. It seems that, for some reason, it no longer shows the stdout and doesn't get the stdin. It's not a real problem because the kernel starts correctly and I connect to the machine via SSH, still it's strange because it happens only with that flag.
Anyway, thanks again for your help.
On Wed, 30 Mar 2022 at 02:40, Minggui Cao <minggui.cao@...> wrote:
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: CAT definition in the scenario xmls
Minggui Cao
Yes, it is for L3 CAT. You can check tgl-rvp.xml the board file, there are some changes for L3 info.
Current, ACRN just supports one of L2/L3 CAT, if you need support both, you can do it as hard code.
Thanks Minggui
From: acrn-users@... <acrn-users@...>
On Behalf Of jordan.nowak22@...
Hi Minggui,
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Using perf to access hardware events in pre-launched VM
Paolo Crotti
IT WORKS! I set the scenario as you said and now I can read the cache events. Thank you so much for the help. Only one small note: when I use the GUEST_FLAG_LAPIC_PASSTHROUGH flag, the terminal of the VM (minicom) becomes unresponsive. When I start the VM, I see some of the kernel messages: it displays only the ones with the time (like [ 1.299022] Run /init as init process) and none with the "ok" (like [ OK ] Started WPA supplicant.). I cannot write or interact in any way with the shell. It seems that, for some reason, it no longer shows the stdout and doesn't get the stdin. It's not a real problem because the kernel starts correctly and I connect to the machine via SSH, still it's strange because it happens only with that flag. Anyway, thanks again for your help.
On Wed, 30 Mar 2022 at 02:40, Minggui Cao <minggui.cao@...> wrote:
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: CAT definition in the scenario xmls
jordan.nowak22@...
Hi Minggui,
Do you mean that for L3 CAT setting, i also need specify it in the board xmls in the CLOS info portion? if i want to use both L2 and L3 CAT, how would i definte that in the board xmls?
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: CAT definition in the scenario xmls
Minggui Cao
Hi, for CAT support (L2/L3), you can check it by cpuid;
For L2, if on core platform it is private for a physical core, L3/LLC is shared between cores, if hyper-threading is not enabled, L2 CAT not helpful.
L2/L3 CAT use different MSR to set, so no matter the cache ways the same or not.
You can refer ACRN: release_2.5 branch, the tgl-rvp board industry scenario has L3 CAT setting.
From: acrn-users@... <acrn-users@...>
On Behalf Of jordan.nowak22@...
Hi ACRN experts,
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
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,
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>
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
Hi Minggui, 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
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
CAT definition in the scenario xmls
jordan.nowak22@...
Hi ACRN experts,
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Using perf to access hardware events in pre-launched VM
Paolo Crotti
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
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Using perf to access hardware events in pre-launched VM
Minggui Cao
Hi, Paolo,
Could you check again to rdmsr 0x186 and 0x38f? If the ACRN has not pass-through PMU to VM, it shall like following:
root@10239146109sos-dom0:~# dmesg | grep -i pmu [ 0.143455] Performance Events: unsupported p6 CPU model 140 no PMU driver, software events only. root@10239146109sos-dom0:~# rdmsr 0x186 rdmsr: CPU 0 cannot read MSR 0x00000186 root@10239146109sos-dom0:~# rdmsr 0x38f rdmsr: CPU 0 cannot read MSR 0x0000038f
But from your feedback, you can rdmsr 0x186 and no PMU driver. It is very strange.
Thanks! Minggui
From: acrn-users@... <acrn-users@...>
On Behalf Of Paolo Crotti
Hi Minggui, [ 0.075539] Performance Events: unsupported p6 CPU model 150 no PMU driver, software events only.
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Extracting scenario xml information
jordan.nowak22@...
noted, would this be implemented in the future?
i don't have a use case for this, just want to double confirm my changes on scenario xml in the target board itself
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Using perf to access hardware events in pre-launched VM
Paolo Crotti
Hi Minggui,
I checked "dmesg | grep -i pmu" and it returned me: [ 0.075539] Performance Events: unsupported p6 CPU model 150 no PMU driver, software events only. And all the events in your perf command are not in my "perf list".
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Using perf to access hardware events in pre-launched VM
Minggui Cao
Following is an example from my side:
./perf stat -C 1 -e mem_load_retired.l2_hit,mem_load_retired.l2_miss,mem_load_retired.l3_hit,mem_load_retired.l3_miss ./pmu_mem -a 1 -p 80 -l 1 -m 12
Performance counter stats for 'CPU(s) 1':
30260 mem_load_retired.l2_hit 7718 mem_load_retired.l2_miss 2587 mem_load_retired.l3_hit 4240 mem_load_retired.l3_miss
From: acrn-users@... <acrn-users@...>
On Behalf Of Minggui Cao
Hi, Paolo, If you can read 0x186, it means, you can read PMU MSRs, it shall work for perf to sample some events, like LLC misses.
You can also check by: dmesg | grep -i pmu To check PMU driver is probed.
You don’t need modify the scenario file.
Minggui
From: acrn-users@... <acrn-users@...>
On Behalf Of Paolo Crotti
Hi Minggui, make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» Board XML is fetched from /home/paoloc/acrn-work/my_board.xml Scneario XML is configuration fetched from /home/paoloc/acrn-work/notPartitioned-EnablePMU.xml /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/allocation.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/unified.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/config.mk generated Traceback (most recent call last): File "/home/paoloc/acrn-work/acrn-hypervisor/hypervisor/../misc/config_tools/board_config/board_cfg_gen.py", line 137, in <module> err_dic = main(ARGS) File "/home/paoloc/acrn-work/acrn-hypervisor/hypervisor/../misc/config_tools/board_config/board_cfg_gen.py", line 95, in main err_dic = board_info_h.generate_file(config) File "/home/paoloc/acrn-work/acrn-hypervisor/misc/config_tools/board_config/board_info_h.py", line 96, in generate_file scenario_cfg_lib.VM_DB[common.VM_TYPES[0]]['load_type'] == "PRE_LAUNCHED_VM" KeyError: 'RTVM' make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make -C /home/paoloc/acrn-work/acrn-hypervisor/hypervisor BOARD=/home/paoloc/acrn-work/my_board.xml SCENARIO=/home/paoloc/acrn-work/notPartitioned-EnablePMU.xml HV_OBJDIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor RELEASE= make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/include/config.h generated Start pre-build static check ... make -C ../misc/hv_prebuild BOARD=my_board SCENARIO=partitioned_CAT TARGET_DIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs make[2]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[2]: *** Nessuna regola per generare l'obiettivo «/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/scenarios/partitioned_CAT/vm_configurations.c», necessario per «default». Arresto. make[2]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[1]: *** [Makefile:413: pre_build] Errore 2 make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make: *** [Makefile:109: hypervisor] Errore 2
make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» Board XML is fetched from /home/paoloc/acrn-work/my_board.xml Scneario XML is configuration fetched from /home/paoloc/acrn-work/notPartitioned-EnablePMU.xml /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/allocation.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/unified.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/config.mk generated Board configurations for my_board is generated successfully. Error: Scenario xml file validation failed: Error: vm:id=0: 'vm:id=0' Unexpected child with tag 'load_order' at position 2. Tag (name | clos | priority | legacy_vuart | console_vuart | communication_vuart) expected.: last call: <Element 'vm' at 0x7fd0629775e0> Error: vm:id=1: 'vm:id=1' Unexpected child with tag 'load_order' at position 2. Tag (name | clos | priority | legacy_vuart | console_vuart | communication_vuart) expected.: last call: <Element 'vm' at 0x7fd06297b6d0> make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make -C /home/paoloc/acrn-work/acrn-hypervisor/hypervisor BOARD=/home/paoloc/acrn-work/my_board.xml SCENARIO=/home/paoloc/acrn-work/notPartitioned-EnablePMU.xml HV_OBJDIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor RELEASE= make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/include/config.h generated Start pre-build static check ... make -C ../misc/hv_prebuild BOARD=my_board SCENARIO=partitioned_CAT TARGET_DIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs make[2]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[2]: *** Nessuna regola per generare l'obiettivo «/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/scenarios/partitioned_CAT/vm_configurations.c», necessario per «default». Arresto. make[2]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[1]: *** [Makefile:413: pre_build] Errore 2 make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make: *** [Makefile:109: hypervisor] Errore 2
make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» Board XML is fetched from /home/paoloc/acrn-work/my_board.xml Scneario XML is configuration fetched from /home/paoloc/acrn-work/notPartitioned-EnablePMU.xml /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/allocation.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/unified.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/config.mk generated Board configurations for my_board is generated successfully. Error: Scenario xml file validation failed: Error: vm:id=0: 'vm:id=0' Unexpected child with tag 'lapic_passthrough' at position 4.: last call: <Element 'vm' at 0x7fc2ef3a05e0> Error: vm:id=1: 'vm:id=1' Unexpected child with tag 'lapic_passthrough' at position 4.: last call: <Element 'vm' at 0x7fc2ef3a4770> make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make -C /home/paoloc/acrn-work/acrn-hypervisor/hypervisor BOARD=/home/paoloc/acrn-work/my_board.xml SCENARIO=/home/paoloc/acrn-work/notPartitioned-EnablePMU.xml HV_OBJDIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor RELEASE= make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/include/config.h generated Start pre-build static check ... make -C ../misc/hv_prebuild BOARD=my_board SCENARIO=partitioned_CAT TARGET_DIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs make[2]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[2]: *** Nessuna regola per generare l'obiettivo «/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/scenarios/partitioned_CAT/vm_configurations.c», necessario per «default». Arresto. make[2]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[1]: *** [Makefile:413: pre_build] Errore 2 make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make: *** [Makefile:109: hypervisor] Errore 2
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Using perf to access hardware events in pre-launched VM
Minggui Cao
Hi, Paolo, If you can read 0x186, it means, you can read PMU MSRs, it shall work for perf to sample some events, like LLC misses.
You can also check by: dmesg | grep -i pmu To check PMU driver is probed.
You don’t need modify the scenario file.
Minggui
From: acrn-users@... <acrn-users@...>
On Behalf Of Paolo Crotti
Hi Minggui, make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» Board XML is fetched from /home/paoloc/acrn-work/my_board.xml Scneario XML is configuration fetched from /home/paoloc/acrn-work/notPartitioned-EnablePMU.xml /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/allocation.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/unified.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/config.mk generated Traceback (most recent call last): File "/home/paoloc/acrn-work/acrn-hypervisor/hypervisor/../misc/config_tools/board_config/board_cfg_gen.py", line 137, in <module> err_dic = main(ARGS) File "/home/paoloc/acrn-work/acrn-hypervisor/hypervisor/../misc/config_tools/board_config/board_cfg_gen.py", line 95, in main err_dic = board_info_h.generate_file(config) File "/home/paoloc/acrn-work/acrn-hypervisor/misc/config_tools/board_config/board_info_h.py", line 96, in generate_file scenario_cfg_lib.VM_DB[common.VM_TYPES[0]]['load_type'] == "PRE_LAUNCHED_VM" KeyError: 'RTVM' make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make -C /home/paoloc/acrn-work/acrn-hypervisor/hypervisor BOARD=/home/paoloc/acrn-work/my_board.xml SCENARIO=/home/paoloc/acrn-work/notPartitioned-EnablePMU.xml HV_OBJDIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor RELEASE= make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/include/config.h generated Start pre-build static check ... make -C ../misc/hv_prebuild BOARD=my_board SCENARIO=partitioned_CAT TARGET_DIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs make[2]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[2]: *** Nessuna regola per generare l'obiettivo «/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/scenarios/partitioned_CAT/vm_configurations.c», necessario per «default». Arresto. make[2]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[1]: *** [Makefile:413: pre_build] Errore 2 make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make: *** [Makefile:109: hypervisor] Errore 2
make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» Board XML is fetched from /home/paoloc/acrn-work/my_board.xml Scneario XML is configuration fetched from /home/paoloc/acrn-work/notPartitioned-EnablePMU.xml /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/allocation.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/unified.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/config.mk generated Board configurations for my_board is generated successfully. Error: Scenario xml file validation failed: Error: vm:id=0: 'vm:id=0' Unexpected child with tag 'load_order' at position 2. Tag (name | clos | priority | legacy_vuart | console_vuart | communication_vuart) expected.: last call: <Element 'vm' at 0x7fd0629775e0> Error: vm:id=1: 'vm:id=1' Unexpected child with tag 'load_order' at position 2. Tag (name | clos | priority | legacy_vuart | console_vuart | communication_vuart) expected.: last call: <Element 'vm' at 0x7fd06297b6d0> make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make -C /home/paoloc/acrn-work/acrn-hypervisor/hypervisor BOARD=/home/paoloc/acrn-work/my_board.xml SCENARIO=/home/paoloc/acrn-work/notPartitioned-EnablePMU.xml HV_OBJDIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor RELEASE= make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/include/config.h generated Start pre-build static check ... make -C ../misc/hv_prebuild BOARD=my_board SCENARIO=partitioned_CAT TARGET_DIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs make[2]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[2]: *** Nessuna regola per generare l'obiettivo «/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/scenarios/partitioned_CAT/vm_configurations.c», necessario per «default». Arresto. make[2]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[1]: *** [Makefile:413: pre_build] Errore 2 make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make: *** [Makefile:109: hypervisor] Errore 2
make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» Board XML is fetched from /home/paoloc/acrn-work/my_board.xml Scneario XML is configuration fetched from /home/paoloc/acrn-work/notPartitioned-EnablePMU.xml /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/allocation.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/unified.xml generated /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/config.mk generated Board configurations for my_board is generated successfully. Error: Scenario xml file validation failed: Error: vm:id=0: 'vm:id=0' Unexpected child with tag 'lapic_passthrough' at position 4.: last call: <Element 'vm' at 0x7fc2ef3a05e0> Error: vm:id=1: 'vm:id=1' Unexpected child with tag 'lapic_passthrough' at position 4.: last call: <Element 'vm' at 0x7fc2ef3a4770> make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make -C /home/paoloc/acrn-work/acrn-hypervisor/hypervisor BOARD=/home/paoloc/acrn-work/my_board.xml SCENARIO=/home/paoloc/acrn-work/notPartitioned-EnablePMU.xml HV_OBJDIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor RELEASE= make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» /home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/include/config.h generated Start pre-build static check ... make -C ../misc/hv_prebuild BOARD=my_board SCENARIO=partitioned_CAT TARGET_DIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs make[2]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[2]: *** Nessuna regola per generare l'obiettivo «/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/scenarios/partitioned_CAT/vm_configurations.c», necessario per «default». Arresto. make[2]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild» make[1]: *** [Makefile:413: pre_build] Errore 2 make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor» make: *** [Makefile:109: hypervisor] Errore 2
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Using perf to access hardware events in pre-launched VM
Paolo Crotti
Scenario files:
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Using perf to access hardware events in pre-launched VM
Paolo Crotti
Hi Minggui,
Thanks for the quick answer. With my original scenario, I tried rdmsr 0x186 and it returned rdmsr(0x186):0x0. Is it ok? Then I modified the scenario and i get a lot of errors: First I changed the <vm_type> PRE_STD_VM to RTVM, then run make hypervisor and I got this error: make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
Board XML is fetched from /home/paoloc/acrn-work/my_board.xml
Scneario XML is configuration fetched from /home/paoloc/acrn-work/notPartitioned-EnablePMU.xml
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/allocation.xml generated
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/unified.xml generated
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/config.mk generated
Traceback (most recent call last):
File "/home/paoloc/acrn-work/acrn-hypervisor/hypervisor/../misc/config_tools/board_config/board_cfg_gen.py", line 137, in <module>
err_dic = main(ARGS)
File "/home/paoloc/acrn-work/acrn-hypervisor/hypervisor/../misc/config_tools/board_config/board_cfg_gen.py", line 95, in main
err_dic = board_info_h.generate_file(config)
File "/home/paoloc/acrn-work/acrn-hypervisor/misc/config_tools/board_config/board_info_h.py", line 96, in generate_file
scenario_cfg_lib.VM_DB[common.VM_TYPES[0]]['load_type'] == "PRE_LAUNCHED_VM"
KeyError: 'RTVM'
make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
make -C /home/paoloc/acrn-work/acrn-hypervisor/hypervisor BOARD=/home/paoloc/acrn-work/my_board.xml SCENARIO=/home/paoloc/acrn-work/notPartitioned-EnablePMU.xml HV_OBJDIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor RELEASE=
make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/include/config.h generated
Start pre-build static check ...
make -C ../misc/hv_prebuild BOARD=my_board SCENARIO=partitioned_CAT TARGET_DIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs
make[2]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild»
make[2]: *** Nessuna regola per generare l'obiettivo «/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/scenarios/partitioned_CAT/vm_configurations.c», necessario per «default». Arresto.
make[2]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild»
make[1]: *** [Makefile:413: pre_build] Errore 2
make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
make: *** [Makefile:109: hypervisor] Errore 2
Then if I add this line <load_order>PRE_LAUNCHED_VM</load_order>, I get a different error: make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
Board XML is fetched from /home/paoloc/acrn-work/my_board.xml
Scneario XML is configuration fetched from /home/paoloc/acrn-work/notPartitioned-EnablePMU.xml
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/allocation.xml generated
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/unified.xml generated
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/config.mk generated
Board configurations for my_board is generated successfully.
Error: Scenario xml file validation failed:
Error: vm:id=0: 'vm:id=0' Unexpected child with tag 'load_order' at position 2. Tag (name | clos | priority | legacy_vuart | console_vuart | communication_vuart) expected.: last call: <Element 'vm' at 0x7fd0629775e0>
Error: vm:id=1: 'vm:id=1' Unexpected child with tag 'load_order' at position 2. Tag (name | clos | priority | legacy_vuart | console_vuart | communication_vuart) expected.: last call: <Element 'vm' at 0x7fd06297b6d0>
make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
make -C /home/paoloc/acrn-work/acrn-hypervisor/hypervisor BOARD=/home/paoloc/acrn-work/my_board.xml SCENARIO=/home/paoloc/acrn-work/notPartitioned-EnablePMU.xml HV_OBJDIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor RELEASE=
make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/include/config.h generated
Start pre-build static check ...
make -C ../misc/hv_prebuild BOARD=my_board SCENARIO=partitioned_CAT TARGET_DIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs
make[2]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild»
make[2]: *** Nessuna regola per generare l'obiettivo «/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/scenarios/partitioned_CAT/vm_configurations.c», necessario per «default». Arresto.
make[2]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild»
make[1]: *** [Makefile:413: pre_build] Errore 2
make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
make: *** [Makefile:109: hypervisor] Errore 2
And if I add <lapic_passthrough>y</lapic_passthrough>, I get another different error: make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
Board XML is fetched from /home/paoloc/acrn-work/my_board.xml
Scneario XML is configuration fetched from /home/paoloc/acrn-work/notPartitioned-EnablePMU.xml
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/allocation.xml generated
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/unified.xml generated
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/config.mk generated
Board configurations for my_board is generated successfully.
Error: Scenario xml file validation failed:
Error: vm:id=0: 'vm:id=0' Unexpected child with tag 'lapic_passthrough' at position 4.: last call: <Element 'vm' at 0x7fc2ef3a05e0>
Error: vm:id=1: 'vm:id=1' Unexpected child with tag 'lapic_passthrough' at position 4.: last call: <Element 'vm' at 0x7fc2ef3a4770>
make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
make -C /home/paoloc/acrn-work/acrn-hypervisor/hypervisor BOARD=/home/paoloc/acrn-work/my_board.xml SCENARIO=/home/paoloc/acrn-work/notPartitioned-EnablePMU.xml HV_OBJDIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor RELEASE=
make[1]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/include/config.h generated
Start pre-build static check ...
make -C ../misc/hv_prebuild BOARD=my_board SCENARIO=partitioned_CAT TARGET_DIR=/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs
make[2]: ingresso nella directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild»
make[2]: *** Nessuna regola per generare l'obiettivo «/home/paoloc/acrn-work/acrn-hypervisor/build/hypervisor/configs/scenarios/partitioned_CAT/vm_configurations.c», necessario per «default». Arresto.
make[2]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/misc/hv_prebuild»
make[1]: *** [Makefile:413: pre_build] Errore 2
make[1]: uscita dalla directory «/home/paoloc/acrn-work/acrn-hypervisor/hypervisor»
make: *** [Makefile:109: hypervisor] Errore 2
Do you have any idea what the problem could be? P.S. Attached my original scenario and the modified one.
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Extracting scenario xml information
I do not believe this is possible although this may be an interesting feature. What use-case do you have in mind for this?
Geoffroy
From: acrn-users@... <acrn-users@...>
On Behalf Of jordan.nowak22@...
Hi ACRN experts,
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Extracting scenario xml information
jordan.nowak22@...
Hi ACRN experts,
Is there a way for me to extract my scenario xmls information from the hypervisor binary or from the target itself rather than from the acrn hypervisor build folder?
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Re: Using perf to access hardware events in pre-launched VM
Minggui Cao
Hi,Paolo, 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”> <vm_type>RTVM</vm_type> <load_order>PRE_LAUNCHED_VM</load_order> <name>PRE_RT_VM0</name> <lapic_passthrough>y</lapic_passthrough> à if it is configured, you can search code: is_lapic_pt_configured shall be used for PMU MSRs.
Thanks Minggui
From: acrn-users@... <acrn-users@...>
On Behalf Of Paolo Crotti
Hi everyone,
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Using perf to access hardware events in pre-launched VM
Paolo Crotti
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!
|
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||
2022 ACRN Project Technical Community Meeting Minutes - WW12'22
Zou, Terry
ACRN Project TCM - 16th Mar 2022
Location Online by Zoom: https://zoom.com.cn/j/320664063
Attendees (Total 10, 16/03)
Agenda
Download foil from ACRN Presentation->WW12’22
Description: We will introduce Libvirt
enhancement in ACRN, VM management functionality and typical VM Destroy/Shutdown/Reboot design.
Q&A:
A: Yes, those patches were already in ACRN github, no need to wait for v3.0 release, feel free to try if you are interested.
A: For long term, because libvirt is more popular in industry, we prefer to let libvirt replace acrn-d for VM management, but for short-term, both ‘libvirt’ and ‘acrn-d’
are supported in ACRN.
Marketing/Events N/A
Resources Project URL:
|
|||||||||||||||||||||||||
|