]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Don't kill SEV guest if SMAP erratum triggers in usermode
authorSean Christopherson <seanjc@google.com>
Thu, 20 Jan 2022 01:07:19 +0000 (01:07 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 Jan 2022 17:15:02 +0000 (12:15 -0500)
commitc01864c6c813af643db68d13a5ba1b5a031583f5
tree436f0d0cf7a1142c9edbe2c82d0ddce470d1d84c
parent290fdcd2f21c9658c7b88d541c30b9c0463cd5e4
KVM: SVM: Don't kill SEV guest if SMAP erratum triggers in usermode

Inject a #GP instead of synthesizing triple fault to try to avoid killing
the guest if emulation of an SEV guest fails due to encountering the SMAP
erratum.  The injected #GP may still be fatal to the guest, e.g. if the
userspace process is providing critical functionality, but KVM should
make every attempt to keep the guest alive.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Message-Id: <20220120010719.711476-10-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c