]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Emulate split-lock access as a write in emulator
authorXiaoyao Li <xiaoyao.li@intel.com>
Fri, 10 Apr 2020 11:54:01 +0000 (13:54 +0200)
committerBorislav Petkov <bp@suse.de>
Sat, 11 Apr 2020 14:40:55 +0000 (16:40 +0200)
commit8ce6594d854f099452f299439133d4327a8accc7
tree7f2d97a3a8e88b134b5309f72275c092fb454c2d
parent43ca5fc70c05859f7d4fa7e96749a28bdf1b25c9
KVM: x86: Emulate split-lock access as a write in emulator

Emulate split-lock accesses as writes if split lock detection is on
to avoid #AC during emulation, which will result in a panic(). This
should never occur for a well-behaved guest, but a malicious guest can
manipulate the TLB to trigger emulation of a locked instruction[1].

More discussion can be found at [2][3].

[1] https://lkml.kernel.org/r/8c5b11c9-58df-38e7-a514-dc12d687b198@redhat.com
[2] https://lkml.kernel.org/r/20200131200134.GD18946@linux.intel.com
[3] https://lkml.kernel.org/r/20200227001117.GX9940@linux.intel.com

Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lkml.kernel.org/r/20200410115517.084300242@linutronix.de
arch/x86/kvm/x86.c