]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Extend VMXs #AC interceptor to handle split lock #AC in guest
authorXiaoyao Li <xiaoyao.li@intel.com>
Fri, 10 Apr 2020 11:54:02 +0000 (13:54 +0200)
committerBorislav Petkov <bp@suse.de>
Sat, 11 Apr 2020 14:42:41 +0000 (16:42 +0200)
commit98abc7a22180df08edbc18ef01513e239a5f3a12
tree45e390cc34bd88cc38cc26acc093ca74b59141d6
parent8ce6594d854f099452f299439133d4327a8accc7
KVM: VMX: Extend VMXs #AC interceptor to handle split lock #AC in guest

Two types of #AC can be generated in Intel CPUs:
 1. legacy alignment check #AC
 2. split lock #AC

Reflect #AC back into the guest if the guest has legacy alignment checks
enabled or if split lock detection is disabled.

If the #AC is not a legacy one and split lock detection is enabled, then
invoke handle_guest_split_lock() which will either warn and disable split
lock detection for this task or force SIGBUS on it.

[ tglx: Switch it to handle_guest_split_lock() and rename the misnamed
  helper function. ]

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.176308876@linutronix.de
arch/x86/kvm/vmx/vmx.c