From: Haozhong Zhang haozhong.zhang@intel.com
[ upstream commit 2a266f23550be997d783f27e704b9b40c4010292 Mon Sep 17 00:00:00 2001 ]
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 Fixes: 664f8e26b00c7673a8303b0d40853a0c24ca93e1 Signed-off-by: Paolo Bonzini pbonzini@redhat.com --- arch/x86/kvm/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index c4deb1f34faa..e577bacd4bd0 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -3781,7 +3781,8 @@ static int kvm_arch_setup_async_pf(struct kvm_vcpu *vcpu, gva_t gva, gfn_t gfn) bool kvm_can_do_async_pf(struct kvm_vcpu *vcpu) { if (unlikely(!lapic_in_kernel(vcpu) || - kvm_event_needs_reinjection(vcpu))) + kvm_event_needs_reinjection(vcpu) || + vcpu->arch.exception.pending)) return false;
if (!vcpu->arch.apf.delivery_as_pf_vmexit && is_guest_mode(vcpu))
On Fri, Feb 09, 2018 at 06:00:42PM +0100, Paolo Bonzini wrote:
From: Haozhong Zhang haozhong.zhang@intel.com
[ upstream commit 2a266f23550be997d783f27e704b9b40c4010292 Mon Sep 17 00:00:00 2001 ]
Odd date :)
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 Fixes: 664f8e26b00c7673a8303b0d40853a0c24ca93e1
So this is only needed for 4.14.y?
thanks,
greg k-h
On 09/02/2018 18:17, Greg KH wrote:
On Fri, Feb 09, 2018 at 06:00:42PM +0100, Paolo Bonzini wrote:
From: Haozhong Zhang haozhong.zhang@intel.com
[ upstream commit 2a266f23550be997d783f27e704b9b40c4010292 Mon Sep 17 00:00:00 2001 ]
Odd date :)
Oops... git's fake mbox "From" line.
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 Fixes: 664f8e26b00c7673a8303b0d40853a0c24ca93e1
So this is only needed for 4.14.y?
Yes. 4.13 and 4.15 both work.
Paolo
On Fri, Feb 09, 2018 at 06:21:13PM +0100, Paolo Bonzini wrote:
On 09/02/2018 18:17, Greg KH wrote:
On Fri, Feb 09, 2018 at 06:00:42PM +0100, Paolo Bonzini wrote:
From: Haozhong Zhang haozhong.zhang@intel.com
[ upstream commit 2a266f23550be997d783f27e704b9b40c4010292 Mon Sep 17 00:00:00 2001 ]
Odd date :)
Oops... git's fake mbox "From" line.
Yeah, I guessed, odd it showed up here...
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 Fixes: 664f8e26b00c7673a8303b0d40853a0c24ca93e1
So this is only needed for 4.14.y?
Yes. 4.13 and 4.15 both work.
Wonderful, I'll queue this up after this round of kernels are released in a few days.
thanks,
greg k-h
linux-stable-mirror@lists.linaro.org