]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Don't apply SEV+SMAP workaround on code fetch or PT access
authorSean Christopherson <seanjc@google.com>
Thu, 20 Jan 2022 01:07:18 +0000 (01:07 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 Jan 2022 17:15:01 +0000 (12:15 -0500)
commit290fdcd2f21c9658c7b88d541c30b9c0463cd5e4
treede291251903e4c7c7af2d79f7069976690d96b1e
parentb9014f1788cd0febf0945eca2dcb46ff7cf0d3f0
KVM: SVM: Don't apply SEV+SMAP workaround on code fetch or PT access

Resume the guest instead of synthesizing a triple fault shutdown if the
instruction bytes buffer is empty due to the #NPF being on the code fetch
itself or on a page table access.  The SMAP errata applies if and only if
the code fetch was successful and ucode's subsequent data read from the
code page encountered a SMAP violation.  In practice, the guest is likely
hosed either way, but crashing the guest on a code fetch to emulated MMIO
is technically wrong according to the behavior described in the APM.

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