Re: [PATCH v1 0/4] Enable LBR for the guest

2017-09-26 Thread Andi Kleen
> On the other side, it seems that the (guest) kernel driver also works > without > the above being supported, should we change it to report error and stop > using the PMU features when the check of the above two fails (at > intel_pmu_init())? You could add the extra check for the LBR code yes,

Re: [PATCH v1 0/4] Enable LBR for the guest

2017-09-26 Thread Wei Wang
On 09/25/2017 10:59 PM, Andi Kleen wrote: On Mon, Sep 25, 2017 at 12:44:52PM +0800, Wei Wang wrote: This patch series enables the Last Branch Recording feature for the guest. Instead of trapping each LBR stack MSR access, the MSRs are passthroughed to the guest. Those MSRs are switched (i.e.

Re: [PATCH v1 0/4] Enable LBR for the guest

2017-09-25 Thread Andi Kleen
On Mon, Sep 25, 2017 at 12:44:52PM +0800, Wei Wang wrote: > This patch series enables the Last Branch Recording feature for the > guest. Instead of trapping each LBR stack MSR access, the MSRs are > passthroughed to the guest. Those MSRs are switched (i.e. load and > saved) on VMExit and VMEntry.

[PATCH v1 0/4] Enable LBR for the guest

2017-09-24 Thread Wei Wang
This patch series enables the Last Branch Recording feature for the guest. Instead of trapping each LBR stack MSR access, the MSRs are passthroughed to the guest. Those MSRs are switched (i.e. load and saved) on VMExit and VMEntry. Test: Try "perf record -b ./test_program" on guest. Wei Wang