linux-stable/arch/x86
Sean Christopherson 0b5f20dc30 KVM: SVM: Truncate GPR value for DR and CR accesses in !64-bit mode
commit 0884335a2e upstream.

Drop bits 63:32 on loads/stores to/from DRs and CRs when the vCPU is not
in 64-bit mode.  The APM states bits 63:32 are dropped for both DRs and
CRs:

  In 64-bit mode, the operand size is fixed at 64 bits without the need
  for a REX prefix. In non-64-bit mode, the operand size is fixed at 32
  bits and the upper 32 bits of the destination are forced to 0.

Fixes: 7ff76d58a9 ("KVM: SVM: enhance MOV CR intercept handler")
Fixes: cae3797a46 ("KVM: SVM: enhance mov DR intercept handler")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210422022128.3464144-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[sudip: manual backport to old file]
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-10 12:43:53 +02:00
..
boot x86/boot/compressed: Disable relocation relaxation 2021-01-30 13:31:16 +01:00
configs x86/defconfig: Enable CONFIG_USB_XHCI_HCD=y 2020-09-23 10:46:37 +02:00
crypto crypto: aesni - add compatibility with IAS 2020-08-21 09:48:13 +02:00
entry x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported 2021-05-22 10:57:26 +02:00
events x86/events/amd/iommu: Fix sysfs type mismatch 2021-05-22 10:57:31 +02:00
hyperv x86/hyperv: mark hyperv_init as __init function 2019-12-01 09:14:37 +01:00
ia32 x86/ia32: Fix ia32_restore_sigcontext() AC leak 2019-05-31 06:47:31 -07:00
include x86: Introduce TS_COMPAT_RESTART to fix get_nr_restart_syscall() 2021-03-24 11:05:05 +01:00
kernel x86/kprobes: Fix to check non boostable prefixes correctly 2021-05-22 10:57:30 +02:00
kvm KVM: SVM: Truncate GPR value for DR and CR accesses in !64-bit mode 2021-06-10 12:43:53 +02:00
lib x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes 2021-05-22 10:57:41 +02:00
math-emu x86: math-emu: Fix up 'cmp' insn for clang ias 2020-07-29 07:42:56 +02:00
mm x86/mm: Fix leak of pmd ptlock 2021-01-12 20:09:13 +01:00
net bpf, x86: Validate computation of branch displacements for x86-64 2021-04-10 13:20:11 +02:00
oprofile
pci x86/PCI: Mark Intel C620 MROMs as having non-compliant BARs 2020-06-20 10:25:00 +02:00
platform irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-29 07:42:52 +02:00
power PM / hibernate: Check the success of generating md5 digest before hibernation 2019-11-24 08:23:02 +01:00
purgatory
ras
realmode x86/build: Specify elf_i386 linker emulation explicitly for i386 objects 2019-04-05 22:31:39 +02:00
tools x86/build: Treat R_386_PLT32 relocation as R_386_PC32 2021-03-07 11:27:44 +01:00
um um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP 2018-11-21 09:24:06 +01:00
video
xen Xen/gnttab: handle p2m update errors on a per-slot basis 2021-03-07 11:27:45 +01:00
.gitignore
Kbuild
Kconfig x86/platform/uv: Fix !KEXEC build failure 2021-05-22 10:57:30 +02:00
Kconfig.cpu
Kconfig.debug x86, perf: Fix the dependency of the x86 insn decoder selftest 2020-01-27 14:46:45 +01:00
Makefile x86/build: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS) 2021-05-22 10:57:16 +02:00
Makefile.um
Makefile_32.cpu