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

From: Like Xu
Date: Mon Sep 19 2022 - 03:26:35 EST


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);

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.

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.