KVM MMU: check pending exception before injecting APF
authorHaozhong Zhang <haozhong.zhang@intel.com>
Wed, 10 Jan 2018 13:44:42 +0000 (21:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:22:44 +0000 (20:22 +0100)
commitfea5349eb88bf8e95b0574a7c7d30040c2f07c9c
tree74e733579eabf2c323f27ea986faa67d801310c5
parent4c54eab372f8cd3f3b1f0a07bc484b06eed3c5a0
KVM MMU: check pending exception before injecting APF

commit 2a266f23550be997d783f27e704b9b40c4010292 upstream.

For example, when two APF's for page ready happen after one exit and
the first one becomes pending, the second one will result in #DF.
Instead, just handle the second page fault synchronously.

Reported-by: Ross Zwisler <zwisler@gmail.com>
Message-ID: <CAOxpaSUBf8QoOZQ1p4KfUp0jq76OKfGY4Uxs-Gg8ngReD99xww@mail.gmail.com>
Reported-by: Alec Blayne <ab@tevsa.net>
Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/mmu.c