Re: [PATCH 1/2] KVM: async_pf: Cleanup kvm_setup_async_pf()

From: Paolo Bonzini
Date: Wed Jun 10 2020 - 20:07:12 EST


On 10/06/20 20:14, Sean Christopherson wrote:
>> - /* setup delayed work */
>> + /* Arch specific code should not do async PF in this case */
>> + if (unlikely(kvm_is_error_hva(hva)))
> This feels like it should be changed to a WARN_ON_ONCE in a follow-up.
> With the WARN, the comment could probably be dropped.

I think a race is possible in principle where the memslots are changed
(for example) between s390's page fault handler and the gfn_to_hva call
in kvm_arch_setup_async_pf.

Queued both, thanks!

Paolo