KVM: x86: determine if an exception has an error code only when injecting it.
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 25 Feb 2021 15:41:32 +0000 (17:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Jul 2021 06:16:11 +0000 (08:16 +0200)
commitdee8119eaa9e00f0d1e14f050e1867813a49a1bb
tree3b3cb9361d9417f3d48680fbd05b986b35cd5f8f
parent6f5d7a45f58d3abe3a936de1441b8d6318f978ff
KVM: x86: determine if an exception has an error code only when injecting it.

commit b97f074583736c42fb36f2da1164e28c73758912 upstream.

A page fault can be queued while vCPU is in real paged mode on AMD, and
AMD manual asks the user to always intercept it
(otherwise result is undefined).
The resulting VM exit, does have an error code.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210225154135.405125-2-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Zubin Mithra <zsm@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/x86.c