linux-stable/arch/x86
Babu Moger 3b65909158 KVM: SVM: Clear the CR4 register on reset
[ Upstream commit 9e46f6c6c9 ]

This problem was reported on a SVM guest while executing kexec.
Kexec fails to load the new kernel when the PCID feature is enabled.

When kexec starts loading the new kernel, it starts the process by
resetting the vCPU's and then bringing each vCPU online one by one.
The vCPU reset is supposed to reset all the register states before the
vCPUs are brought online. However, the CR4 register is not reset during
this process. If this register is already setup during the last boot,
all the flags can remain intact. The X86_CR4_PCIDE bit can only be
enabled in long mode. So, it must be enabled much later in SMP
initialization.  Having the X86_CR4_PCIDE bit set during SMP boot can
cause a boot failures.

Fix the issue by resetting the CR4 register in init_vmcb().

Signed-off-by: Babu Moger <babu.moger@amd.com>
Message-Id: <161471109108.30811.6392805173629704166.stgit@bmoger-ubuntu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-11 14:17:29 +01:00
..
boot A set of fixes for x86: 2020-12-06 11:22:39 -08:00
configs * A defconfig fix, from Daniel Díaz. 2020-09-20 15:06:43 -07:00
crypto crypto: aesni - prevent misaligned buffers on the stack 2021-03-04 11:38:31 +01:00
entry x86/entry: Fix instrumentation annotation 2021-03-04 11:38:35 +01:00
events perf/x86/kvm: Add Cascade Lake Xeon steppings to isolation_ucodes[] 2021-03-07 12:34:13 +01:00
hyperv x86/hyperv: Fix kexec panic/hang issues 2021-01-27 11:54:57 +01:00
ia32 x86: remove address space overrides using set_fs() 2020-09-08 22:21:36 -04:00
include xen: fix p2m size in dom0 for disabled memory hotplug case 2021-03-07 12:34:15 +01:00
kernel x86/reboot: Add Zotac ZBOX CI327 nano PCI reboot quirk 2021-03-07 12:34:09 +01:00
kvm KVM: SVM: Clear the CR4 register on reset 2021-03-11 14:17:29 +01:00
lib x86/mmx: Use KFPU_387 for MMX string operations 2021-01-27 11:55:13 +01:00
math-emu treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mm x86: fix seq_file iteration for pat/memtype.c 2021-03-04 11:38:38 +01:00
net bpf: x64: Do not emit sub/add 0, %rsp when !stack_depth 2020-09-29 16:47:39 -07:00
oprofile
pci x86/pci: Create PCI/MSI irqdomain after x86_init.pci.arch_init() 2021-02-17 11:02:28 +01:00
platform x86/efi: Remove EFI PGD build time checks 2021-02-17 11:02:24 +01:00
power Kbuild updates for v5.9 2020-08-09 14:10:26 -07:00
purgatory treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
ras
realmode x86/head/64: Don't call verify_cpu() on starting APs 2020-09-09 11:33:20 +02:00
tools x86/build: Treat R_386_PLT32 relocation as R_386_PC32 2021-03-07 12:34:04 +01:00
um arch/um: partially revert the conversion to __section() macro 2020-10-26 15:39:37 -07:00
video
xen xen: fix p2m size in dom0 for disabled memory hotplug case 2021-03-07 12:34:15 +01:00
.gitignore
Kbuild
Kconfig fanotify: Fix sys_fanotify_mark() on native x86-32 2021-01-17 14:16:59 +01:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}() 2020-10-06 11:18:04 +02:00
Makefile x86/build: Disable CET instrumentation in the kernel for 32-bit too 2021-02-17 11:02:27 +01:00
Makefile.um
Makefile_32.cpu