linux-stable/arch
Sean Christopherson 9b5e85320f KVM: x86: Take a u64 when checking for a valid dr7 value
Take a u64 instead of an unsigned long in kvm_dr7_valid() to fix a build
warning on i386 due to right-shifting a 32-bit value by 32 when checking
for bits being set in dr7[63:32].

Alternatively, the warning could be resolved by rewriting the check to
use an i386-friendly method, but taking a u64 fixes another oddity on
32-bit KVM.  Beause KVM implements natural width VMCS fields as u64s to
avoid layout issues between 32-bit and 64-bit, a devious guest can stuff
vmcs12->guest_dr7 with a 64-bit value even when both the guest and host
are 32-bit kernels.  KVM eventually drops vmcs12->guest_dr7[63:32] when
propagating vmcs12->guest_dr7 to vmcs02, but ideally KVM would not rely
on that behavior for correctness.

Cc: Jim Mattson <jmattson@google.com>
Cc: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Fixes: ecb697d10f70 ("KVM: nVMX: Check GUEST_DR7 on vmentry of nested guests")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-02-05 15:17:45 +01:00
..
alpha threads-v5.6 2020-01-29 19:38:34 -08:00
arc TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
arm ARM: Cleanups and corner case fixes 2020-01-31 09:30:41 -08:00
arm64 ARM: Cleanups and corner case fixes 2020-01-31 09:30:41 -08:00
c6x Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 10:07:09 -08:00
csky TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
h8300 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 10:07:09 -08:00
hexagon Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 10:07:09 -08:00
ia64 threads-v5.6 2020-01-29 19:38:34 -08:00
m68k threads-v5.6 2020-01-29 19:38:34 -08:00
microblaze threads-v5.6 2020-01-29 19:38:34 -08:00
mips ARM: Cleanups and corner case fixes 2020-01-31 09:30:41 -08:00
nds32 TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
nios2 TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
openrisc TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
parisc threads-v5.6 2020-01-29 19:38:34 -08:00
powerpc ARM: Cleanups and corner case fixes 2020-01-31 09:30:41 -08:00
riscv It has been a relatively quiet cycle for documentation, but there's still a 2020-01-29 15:27:31 -08:00
s390 ARM: Cleanups and corner case fixes 2020-01-31 09:30:41 -08:00
sh threads-v5.6 2020-01-29 19:38:34 -08:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc 2020-01-30 07:36:43 -08:00
um MPX requires recompiling applications, which requires compiler support. 2020-01-30 16:11:50 -08:00
unicore32 MPX requires recompiling applications, which requires compiler support. 2020-01-30 16:11:50 -08:00
x86 KVM: x86: Take a u64 when checking for a valid dr7 value 2020-02-05 15:17:45 +01:00
xtensa threads-v5.6 2020-01-29 19:38:34 -08:00
.gitignore
Kconfig arch/Kconfig: fix indentation 2019-12-04 19:44:12 -08:00