Performance counters for each guest in KVM

My goal is to find the number of instructions after each interrupt passed to the guest in KVM. I am using the retirement counter instruction, programming the corresponding registers with wrmsr. I turn on the counter before the vmlaunch / vmresume command and turn it off on vmexit, which returns. This approach is not very good, as it also considers instructions in host interrupts and other processes. I am using kvm for the Intel I3 processor. Is there any provision for receiving counters only in guest mode in Intel architecture?

+4
source share

Source: https://habr.com/ru/post/1333148/


All Articles