KVM: SVM: WARN if KVM attempts emulation on #UD or #GP for SEV guests
authorSean Christopherson <seanjc@google.com>
Thu, 20 Jan 2022 01:07:16 +0000 (01:07 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 Jan 2022 17:15:01 +0000 (12:15 -0500)
commit132627c64d94b1561ba5a444824e46c9f84c3d5b
tree189b2dd9e352a383e801f0cfb717e1c1faaf4b8a
parent4d31d9eff244e2631f028d658979ccbbdbcb423b
KVM: SVM: WARN if KVM attempts emulation on #UD or #GP for SEV guests

WARN if KVM attempts to emulate in response to #UD or #GP for SEV guests,
i.e. if KVM intercepts #UD or #GP, as emulation on any fault except #NPF
is impossible since KVM cannot read guest private memory to get the code
stream, and the CPU's DecodeAssists feature only provides the instruction
bytes on #NPF.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Message-Id: <20220120010719.711476-7-seanjc@google.com>
[Warn on EMULTYPE_TRAP_UD_FORCED according to Liam Merwick's review. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c