Re: [PATCH v2] x86/tsx: fix KVM guest live migration for tsx=on

From: Pawan Gupta
Date: Tue Apr 12 2022 - 16:03:37 EST


On Mon, Apr 11, 2022 at 04:07:01PM -0400, Jon Kohler wrote:
Move automatic disablement for TSX microcode deprecation from tsx_init() to
x86_get_tsx_auto_mode(), such that systems with tsx=on will continue to
see the TSX CPU features (HLE, RTM) even on updated microcode.

This patch needs to be based on recent changes in TSX handling (due to
Feb 2022 microcode update). These patches were recently merged in tip
tree:

https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/urgent

Specifically these patches:

x86/tsx: Use MSR_TSX_CTRL to clear CPUID bits [1]
x86/tsx: Disable TSX development mode at boot [2]

Thanks,
Pawan

[1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=258f3b8c3210b03386e4ad92b4bd8652b5c1beb3
[2] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=400331f8ffa3bec5c561417e5eec6848464e9160