On 5/11/22 09:43, Yang, Weijiang wrote:
Hi, it's transferred automatically if the MSR is saved in the SMM saveInstead of using flip_arch_lbr_ctl, SMM should save the value of the MSRIn the case of migration in SMM, I assume kvm_x86_ops->enter_smm()
in kvm_x86_ops->enter_smm, and restore it in kvm_x86_ops->leave_smm
(feel free to do it only if guest_cpuid_has(vcpu, X86_FEATURE_LM), i.e.
the 32-bit case can be ignored).
called in source side
and kvm_x86_ops->leave_smm() is called at destination, then should the
saved LBREn be transferred
to destination too? The destination can rely on the bit to defer setting
LBREn bit in
state area. Both enter_smm and leave_smm can access the save state area.
The enter_smm callback is called after saving "normal" state, and it has
to save the state + clear the bit; likewise, the leave_smm callback is
called before saving "normal" state and will restore the old value of
the MSR.
Thanks,
Paolo
VMCS until kvm_x86_ops->leave_smm() is called. is it good? thanks!