Re: [PATCH v14 00/11] KVM: x86/pmu: Guest Last Branch Recording Enabling

Jim Mattson
2022-09-19T18:10:11Z

On Mon, Sep 19, 2022 at 12:26 AM Like Xu <like.xu.linux@gmail.com> wrote:
>
> On 14/9/2022 7:42 am, Jim Mattson wrote:
> > How does live migration work? I don't see any mechanism for recording
> > the current LBR MSRs on suspend or restoring them on resume.
>
> Considering that LBR is still a model specific feature, migration is less
> valuable unless
> both LBR_FMT values of the migration side are the same, the compatibility check
> (based on cpu models) is required (gathering dust in my to-do list);

This seems like a problem best solved in the control plane.

> and there is another dusty missing piece is how to ensure that vcpu can get LBR
> hardware in
> vmx transition when KVM lbr event fails in host lbr event competition, the
> complexity here is
> that the host and guest may have different LBR filtering options.

In case of a conflict, who currently wins? The host or the guest? I'd
like the guest to win, but others may feel differently. Maybe we need
a configuration knob?

> The good news is the Architecture LBR will add save/restore support since Paolo
> is not averse to
> putting more msr's into msrs_to_save_all[], perhaps a dynamic addition mechanism
> is a prerequisite.
>
> Please let me know what your priority preferences are for these tasks above.