On 19/11/19 22:06, Jim Mattson wrote: >> + switch (index) { >> + case MSR_IA32_TSX_CTRL: >> + /* No need to pass TSX_CTRL_CPUID_CLEAR through. */ >> + vmx->guest_msrs[j].mask = ~(u64)TSX_CTRL_CPUID_CLEAR; >> + break; > Why even bother with the special case here? Does this make the wrmsr faster? > No, but it can avoid the wrmsr altogether if the guest uses the same DISABLE_RTM setting but a different value for CPUID_CLEAR. More important, while I am confident re-enabling TSX while in the kernel and only restoring MSR_IA32_TSX_CTRL on return to userspace, I'm more wary of changing CPUID bits while the kernel is running. I will update the comment. Paolo