On Thu, May 4, 2023 at 11:18 AM Mingwei Zhang <mizhang@xxxxxxxxxx> wrote: > > Add MSR_IA32_TSX_CTRL into msrs_to_save[] to explicitly tell userspace to > save/restore the register value during migration. Missing this may cause > userspace that relies on KVM ioctl(KVM_GET_MSR_INDEX_LIST) fail to port the > value to the target VM. > > In addition, there is no need to add MSR_IA32_TSX_CTRL when > ARCH_CAP_TSX_CTRL_MSR is not supported in guest. So add the checking in > kvm_probe_msr_to_save(). > > Fixes: b07a5c53d42a ("KVM: vmx: use MSR_IA32_TSX_CTRL to hard-disable TSX on guest that lack it") > Reported-by: Jim Mattson <jmattson@xxxxxxxxxx> > Signed-off-by: Mingwei Zhang <mizhang@xxxxxxxxxx> Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>