OSDN Git Service

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)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Mar 2021 08:43:27 +0000 (04:43 -0400)
commitb97f074583736c42fb36f2da1164e28c73758912
treeee1254fc50f4a3bd45f90b5c877df41c4a3de39c
parent8173396e94c10dccde5e890f1bb31d11c05cae68
KVM: x86: determine if an exception has an error code only when injecting it.

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>
arch/x86/kvm/x86.c