I am trying to use Intel-PT on the host, while I run a general software program in the guest machine. So what I expect is the Intel-PT running in the host will record all the relevant packets(like PIP, FUP, TSC etc.) and also all the VM-based packets like VMCS.
I use the below command -
./perf kvm --host --guest --guestkallsyms=guest-kallsyms --guestmodules=guest-modules record -e intel_pt//
guest-kallsyms and guest-modules are the kallsyms and module files I copied from the guest onto my host.
I will then start my Virtual Machine. I will run a program on the guest machine. Once the program execution is complete, I will press Ctrl + C (SIGINT) in my host to stop the recording.
I see that once I try to use perf report to read the file generated using the below command -
./perf kvm report -i perf.data.kvm
It returns "NO SAMPLES FOUND". This means that Intel-PT has failed to record any samples.
NOTE: I found that the bit 14 for the value in the MSR MSR_IA32_VMX_MISC
is 0, for my processor. As per the Intel documentation, this bit should be 1 for Intel-PT to be used in VMX operation. Does this in any way affect why Intel-PT does not record any samples ?
Will INTEL-PT work even when the VM is on ? Or is my method of recording data wrong ?
Edit: I am using Linux Kernel 4.11.3, having Ubuntu 17.04 and a Broadwell CPU, which supports Intel-PT.