x86/cpu: Make alternative_msr_write work for 32-bit code
authorJim Mattson <jmattson@google.com>
Sun, 13 May 2018 21:33:57 +0000 (17:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 May 2018 14:58:02 +0000 (16:58 +0200)
commit3a684641619ff0e06b8d4cb8c2ffbef304c9bdb1
tree9c75f87582779890769bb5440234cd1cf8b25d84
parent6fdd277a9326c5ef3fe94999c9c319ad64333fdd
x86/cpu: Make alternative_msr_write work for 32-bit code

commit 5f2b745f5e1304f438f9b2cd03ebc8120b6e0d3b upstream

Cast val and (val >> 32) to (u32), so that they fit in a
general-purpose register in both 32-bit and 64-bit code.

[ tglx: Made it u32 instead of uintptr_t ]

Fixes: c65732e4f721 ("x86/cpu: Restore CPUID_8000_0008_EBX reload")
Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/nospec-branch.h