On Thu, Dec 19, 2019 at 04:28:15PM +0100, Frederic Weisbecker wrote: > Hi, > > While checking the x86 async page fault code, I can't > find anything that prevents KVM_PV_REASON_PAGE_READY to be injected > while the guest has interrupts disabled. If that page fault happens > to trap in an interrupt disabled section, there may be a deadlock due to the > call to wake_up_process() which locks the rq->lock (among others). > > Given how long that code is there, I guess such an issue would > have been reported for a while already. But I just would like to > be sure we are checking that. > > Can someone enlighten me? The check is triggered from the caller of kvm_async_page_present(). kvm_check_async_pf_completion() | |-> kvm_arch_can_inject_async_page_present() | |-> kvm_can_do_async_pf() | |-> kvm_x86_ops->interrupt_allowed()